A list of products available on this site
Documentation for XtraMania's xtras
Prices and links to the online store
Xtras, PDFs, samples
Have a question? Ask us!
Contacts
Logo. www.xtramaina.com  
Home Search E-mail
ADOxtra Reference/cnn.ConnectionString

cnn.ConnectionString

Syntax

put cnn.ConnectionString
cnn.ConnectionString=strCnn

Sets or gets

String value with the information used to establish a connection to a data source.

Description

Sets or gets the ConnectionString property of the wrapped ADODB.Connection object. Indicates the information used to establish a connection to a data source. The ConnectionString property is read/write when the connection is closed and read-only when it is open.
Connection string is the string in form "ArgumentName=ArgumentValue; OtherArgumentName=OtherValue" that specify information necessary to connect to the database. Use BuildConnectionString xtra level method to invoke a dialog for building connection string.
Duplicates of an argument in the ConnectionString property are ignored. The last instance of any argument is used.

Samples

MS Access databases
connectionString="Provider=Microsoft.Jet.OLEDB.4.0; Password=psw; Data Source=D:\Temp\DB.mdb; Mode=ReadWrite;Persist Security Info=True"

MS Access databases via ODBC driver (DSNless connection):
connectionString="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=D:\Temp\DB.mdb"

MS SQL Server:
connectionString="Provider=SQLOLEDB.1; Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=DemoDB;Data Source=SqlServerName"

Oracle databases:
connectionString="Provider=MSDAORA.1; Password=psw; User ID=admin; Data Source=srv; Persist Security Info=True"

Remote database connection:
connectionString="Provider=MS Remote; Data Source=YourDataSourceName; Remote Server=http://YourWebServer; Internet Timeout=300000"

Site homeSearchContact author © Eugene Shoustrov. www.xtramania.com