数据库连接大全

mssql server 数据库教程连接大全SQL Server connection stringsSQL ODBC
connection stringsStandard 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 stringsStandard Security:Provider=SQLOLEDB;Data
Source=Your_Server_Name;Initial Catalog=
Your_Database_Name;UserId=Your_Username;Password=Your_Password;

SQL Server connection strings

Trusted connection:Provider=SQLOLEDB;Data
Source=Your_Server_Name;Initial
Catalog=Your_Database_Name;Integrated Security=SSPI; SQL
OleDbConnection .NET stringsStandard Security:Provider=SQLOLEDB;Data
Source=Your_Server_Name;Initial Catalog=
Your_Database_Name;UserId=Your_Username;Password=Your_Password;

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;”

Trusted connection:Provider=SQLOLEDB;Data
Source=Your_Server_Name;Initial
Catalog=Your_Database_Name;Integrated Security=SSPI; SQL SqlConnection
.NET stringsStandard Security:1. Data Source=Your_Server_Name;Initial
Catalog=
Your_Database_Name;UserId=Your_Username;Password=Your_Password; br2.
Server=Your_Server_Name;Database=Your_Database_Name;UserID=Your_Username;Password=Your_Password;Trusted_Connection=False

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;”

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;

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;”

mysql教程 数据库odbc连接方法

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 stringsMySQL ODBC connection stringsOpen connection to
local MySQL database using MySQL ODBC 3.51 DriverProvider=MSDASQL;
DRIVER={MySQL ODBC 3.51Driver}; SERVER= localhost;
DATABASE=Your_MySQL_Database; UID= Your_Username;
PASSWORD=Your_Password; OPTION=3 MySQL OLE DB OleDbConnection (.NET
framework) connection stringsOpen connection to MySQL
database:Provider=MySQLProv;Data Source=Your_MySQL_Database;User
Id=Your_Username; Password=Your_Password;

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.51Driver}; SERVER= localhost;
DATABASE=Your_MySQL_Database; UID= Your_Username;
PASSWORD=Your_Password; OPTION=3”

发表评论

电子邮件地址不会被公开。 必填项已用*标注