.NET中各种数据库连接大全(精典之极)
ODBC
Standard Security:
"Driver={SQL Server};server=服务器名称;DataBase=数据库名称;Uid=sa;Pwd=sa";
Trusted Connection:
"Driver={SQL Server};server=服务器名称;DataBase=数据库名称;Trusted_Connection=yes";
OLEDB OleDbConnection(.NET)
Standard Security:
"Provider=Sqloledb;data Source=服务器名称;Initial Catalog=数据库名称;User Id=sa;Password=sa";
Trusted Connection:
"Provider=sqloldeb;Data Source=服务器名称;Initial Catalog=数据库名称;Security=SSPI";
SqlConnection(.NET)
standard Security:
"Data Source=服务器名称;Initial Catalog=数据库名称;User ID=sa;Password=sa";
Trusted Connection:
"Data Source=服务器名称;Initial Catalog=数据库名称:Integrated Security=SSPI";
浙公网安备 33010602011771号