一条C#连接SQL Server数据库写法

server=(localhost);database=mydata;User Id=sa;pwd=sa;

"Integrated Security=SSPI;Initial Catalog=Northwind;server=(local)"

Provider=SQLOLEDB.1;Password=你的数据库密码;Persist Security Info=True;User ID=你的用户名;Initial Catalog=你的数据库名;Data Source=你的服务器名

//这是oledb的连接字符串

你可能感兴趣的:(SQL Server)