Sqlserver, sqlite, access database link string

Source: Internet
Author: User
SqlServer: stringconnectionserver32.1.1.48; database name; usersa; passwordsa2008; access2007: Password-less connection string stringconStrProviderMicrosoft. Ace. OleDb.12.0; DataSourceE: 111. accdb; PersistSecurityInfoFalse;

SqlServer: string connection = "server = 32.1.1.48; database = database name; user = sa; password = sa2008"; access 2007: // stringconStr = "Provider = Microsoft. ace. oleDb.12.0; Data Source = E: // 111. accdb; Persist Security Info = False "; // Yes

SqlServer: string connection = "server = 32.1.1.48; database =DatabaseName; user = sa; password = sa2008 ";

Access 2007:

// Password-free connectionString

String conStr = "Provider = Microsoft. Ace. OleDb.12.0; Data Source = E: // 111. accdb; Persist Security Info = False ";

// Password-based connectionString

String conStr = "Provider = Microsoft. Ace. OleDb.12.0; Data Source = E: // 111. accdb; Jet OleDb: DataBase Password = 111 ";

Access 2003

// Password-free connectionString

String conStr = "Provider = Microsoft. Jet. OleDb.4.0; Data Source = E: // 111.mdb; Persist Security Info = False ";

// Password-based connectionString

String conStr = "Provider = Microsoft. Jet. OleDb.4.0; Data Source = E: // 111.mdb; Jet OleDb: DataBase Password = 111 ";

Link accessDatabaseIfUnable to start application workgroup information file lossIt may be a link.StringThe link is incorrect.

Sqlite:

String conStr = "Data Source = E: // 111.db; Password = 111 ";

When using SQLite, you need to add a reference System. Data. SQLite, C # will promptA mixed-mode assembly is generated for the runtime of "v2.0.50727". Without other information configured, the Assembly cannot be loaded at the 4.0 runtime,To solve this problem, add a configuration section in app. config:Startup

     
    
 

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.