http://www.connectionstrings.com/
一、多种连接字符串连接数据库的写法(连接SQL Server)(已经经过测试)
1、String strConnection="server=(local);database=Northwind;integrated security=true;";
2、String strConnection="Data Source=(local);Initial Catalog=Northwind;User Id=laudy;Password=52lisa1314;";
3、String strConnection="Server=(local);Database=Northwind;User ID=laudy;Password=52lisa1314;Trusted_Connection=False;";
4、String strConnection="Data Source=(local);Initial Catalog=Northwind;Integrated Security=SSPI;";
5、String strConnection="Server=(local);Database=Northwind;Trusted_Connection=True;";
6、String strConnection="Data Source=(local);Network Library=dbnmpntw;Initial Catalog=Northwind;User ID=laudy;Password=52lisa1314;";
7、String strConnection="Server=(local);Database=Northwind;User ID=laudy;Password=52lisa1314;Trusted_Connection=False;Packet Size=4096;";
一、多种连接字符串连接数据库的写法(连接SQL Server)(已经经过测试)
1、String strConnection="server=(local);database=Northwind;integrated security=true;";
2、String strConnection="Data Source=(local);Initial Catalog=Northwind;User Id=laudy;Password=52lisa1314;";
3、String strConnection="Server=(local);Database=Northwind;User ID=laudy;Password=52lisa1314;Trusted_Connection=False;";
4、String strConnection="Data Source=(local);Initial Catalog=Northwind;Integrated Security=SSPI;";
5、String strConnection="Server=(local);Database=Northwind;Trusted_Connection=True;";
6、String strConnection="Data Source=(local);Network Library=dbnmpntw;Initial Catalog=Northwind;User ID=laudy;Password=52lisa1314;";
7、String strConnection="Server=(local);Database=Northwind;User ID=laudy;Password=52lisa1314;Trusted_Connection=False;Packet Size=4096;";
浙公网安备 33010602011771号