Mssql, mysql, access, Oracle connection strings

Source: Internet
Author: User
Tags mssql odbc connection

SQL Server connection strings

SQL ODBC connection strings

Standard Security:<Br> "driver = {sqlserver}; server = your_server_name; database = your_database_name; uid = your_username; Pwd = your_password ;"

Trusted connection:<Br> "driver = {sqlserver}; server = your_server_name; database = your_database_name; trusted_connection = yes ;"

SQL OLE DB connection strings

Standard Security:
"Provider = sqloledb; Data Source = your_server_name; initial catalog = your_database_name; userid = your_username; Password = your_password ;"

Trusted connection:
"Provider = sqloledb; Data Source = your_server_name; initial catalog = your_database_name; Integrated Security = sspi ;"

SQL oledbconnection. Net strings

Standard Security:
"Provider = sqloledb; Data Source = your_server_name; initial catalog = your_database_name; userid = your_username; Password = your_password ;"

Trusted connection:
"Provider = sqloledb; Data Source = your_server_name; initial catalog = your_database_name; Integrated Security = sspi ;"

SQL sqlconnection. Net strings

Standard Security:
1. "Data Source = your_server_name; initial catalog = your_database_name; userid = your_username; Password = your_password;" <br> 2. "Server = your_server_name; database = your_database_name; userid = your_username; Password = your_password; trusted_connection = false"

Trusted connection:
1. "Data Source = your_server_name; initial catalog = your_database_name; Integrated Security = sspi ;"
2. "Server = Your_Server_Name; Database = Your_Database_Name; Trusted_Connection = True ;"

MySQL connection strings

MySQL ODBC connection strings

Open connection to local MySQL database using MySQL ODBC 3.51 Driver
"Provider = MSDASQL; DRIVER = {MySQL ODBC 3.51 Driver}; SERVER = localhost; DATABASE = Your_MySQL_Database; UID = Your_Username; PASSWORD = Your_Password; OPTION = 3"

MySQL ole db & oledbconnection (. NET Framework) connection strings

Open connection to MySQL database:
"Provider = MySQLProv; Data Source = Your_MySQL_Database; User Id = Your_Username; Password = Your_Password ;"

MS Access connection strings

MS access ODBC connection strings

Standard Security:
"Driver = {MicrosoftAccessDriver (*. mdb)}; DBQ = C: \ App1 \ Your_Database_Name.mdb; Uid = Your_Username; Pwd = Your_Password ;"

Workgroup:
"Driver = {Microsoft Access Driver (*. mdb)}; Dbq = C: \ App1 \ Your_Database_Name.mdb; SystemDB = C: \ App1 \ Your_Database_Name.mdw ;"

Exclusive"Driver = {Microsoft Access Driver (*. mdb)}; DBQ = C: \ App1 \ Your_Database_Name.mdb; Exclusive = 1; Uid = Your_Username; Pwd = Your_Password ;"

MS access ole db & oledbconnection (. NET Framework) connection strings

Open connection to Access database:
"Provider = Microsoft. Jet. OLEDB.4.0; Data Source = c: \ App1 \ Your_Database_Name.mdb; User Id = admin; Password ="

Open connection to Access database using Workgroup (System database ):
"Provider = Microsoft. Jet. OLEDB.4.0; Data Source = c: \ App1 \ Your_Database_Name.mdb; Jet OLEDB: System Database = c: \ App1 \ Your_System_Database_Name.mdw"

Open connection to password protected access database:
"Provider = Microsoft. Jet. OLEDB.4.0; Data Source = c: \ App1 \ Your_Database_Name.mdb; Jet OLEDB: Database Password = Your_Password"

Open connection to access database located on a network share:
"Provider = Microsoft. Jet. OLEDB.4.0; Data Source = \ Server_Name \ pai_name \ pai_path \ Your_Database_Name.mdb"

Open connection to access database located on a remote server:
"Provider = MS Remote; Remote Server = http: // Your-Remote-Server-IP; Remote Provider = Microsoft. Jet. OLEDB.4.0; Data Source = c: \ App1 \ Your_Database_Name.mdb"

Oracle connection strings

Oracle ODBC connection strings

Open connection to Oracle database using ODBC
"Driver = {Microsoft ODBCforOracle}; Server = Your_Oracle_Server.world; Uid = Your_Username; Pwd = Your_Password ;"

Oracle ole db & oledbconnection (. NET Framework) connection strings

Open connection to Oracle database with standard security:
1. "Provider = MSDAORA; Data Source = Your_Oracle_Database; UserId = Your_Username; Password = Your_Password ;"
2. "Provider = OraOLEDB. Oracle; Your_Oracle_Database; UserId = Your_Username; Password = Your_Password ;"

Open trusted connection to Oracle Database
"Provider = OraOLEDB. Oracle; DataSource = Your_Oracle_Database; OSAuthent = 1 ;"

Related Article

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.