生活就是在不能坚持的时候继续坚持

爱拼才会赢

导航

.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";

posted on 2008-01-18 10:55  cap.net  阅读(105)  评论(0)    收藏  举报