1. ole db of the SQL Server database
Provider = sqloledb; Data Source = myserver \ myinstance; initial catalog = mydatabase; user id = myuid; Password = mypassword;
Network creden connect to SQL Server, which can be integrated with integrated security.
Provider = sqloledb; Data Source = myserver; initial catalog = mydatabase; Integrated Security = sspi;
Note:
Old network creden
Provider = sqloledb; Data Source = myserver; initial catalog = mydatabase; trusted_connection = yes;
Provider represents what kind of database the database provider is! For example, SQL Server is sqloledb.1, and OracleIs oraoledb. 1!
PersistSecurityInfoWhat type of encryption is used!If it is windows or network!
InitialCatalog indicates the database name!
2. Oracle Database OLE DB
Provider = mydbora; Data Source = mydatabasealias; user id = myuid; Password = mypassword;
3. ole db of the Access Database
Provider = Microsoft. Jet. oledb.4.0; Data Source = c: \ path \ To \ mydatabse. mdb;
If the full path of the database is not specified, ADO searches for the database in the current path of the application.
Relative Path provider = Microsoft. Jet. oledb.4.0; Data Source = date \ mydatabse. mdb;
Access database with jet Security
Provider = Microsoft. Jet. oledb.4.0;
Data Source = c: \... \ mysecure. mdb;
Jet oledb: System database = c: \... \ mystem. MDW;
User ID = myusername; Password = mypassword;
Another option is to connect to an Access database with a database password.
Provider = Microsoft. Jet. oledb.4.0;
Data Source = c: \... \ mysecure. mdb;
Jet oledb: Database Password = mypassword;
//
Access 2007
This is a compiled connection strings reference list on how to connect to access 2007.
Ace oledb 12.0
Standard Security
Provider = Microsoft. Ace. oledb.12.0; Data Source = c: \ myfolder \ myaccess2007file. accdb; persist Security info = false;
With Database Password
This is the connection string to use when you have an access 2007 database protected with a password using the "set Database Password" function in access.
Provider = Microsoft. Ace. oledb.12.0; Data Source = c: \ myfolder \ myaccess2007file. accdb; Jet oledb: Database Password = mydbpassword;
========================================================== ==========================================
The format is as follows:
Provider = Microsoft. Ace. oledb.12.0; Data Source = c: \ myfolder \ myaccess2007file. accdb; persist Security info = false;