Tornado API Library - V12.30.08

z.dbDSN Property

Setup Datasource connection.

Product Version

All
[VisualBasic]
PublicPropertydbDSNAsString
[C#]
publicstringdbDSN{set;}

Property Value

Obj.dbDSN = "Connect string"

KeywordDescription

QuickProp Keyword Abbreviation

d

Remarks

For security and single point change purpose, the connection string should be stored in the Global.asax file under either Application or AppSettings of the <configuration></configuration> block. File type as well as physical and virtual paths are automatically recognized. In order to emulate the Classic ASP-db datasource format, The property (eg. dbDSN="Name") will be checked against -

Note: You cannot use Server.Mappath in ConfigurationSettings.AppSettings file.

Format for .mdb, .xls, .csv files -

Example

Acc.dbDSN="Nwind" (Recommended)
Acc.dbQP="d=NWIND"
Acc.dbDSN = "c:\inetpub\wwwroot\DB\Nwind.mdb"
Obj.dbDSN = "Nwind"
Obj.dbDSN = "/Tornado/DB" (Csv and Text)
Obj.dbDSN = Application("NwindApp")
Obj.dbDSN = ConfigurationSettings.AppSettings("NwindApp")
Sq.dbDSN = "Provider=SQLOLEDB; Data Source=fujitsu;Initial Catalog=pubs; UID=sa; PWD=sa"
Sq.dbDSN= "fujitsu;pubs;sa;sa" 
Oracle.dbDSN = "GDB92;scott;tiger" (only 3 parameters for Oracle)
For SQL class datasource, you MUST specify the dbType like SQLClient, OleDB etc.

See Also

z Class | Tornado Namespace