ADO connection database string

Source: Internet
Author: User
Tags ole

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;

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.