Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;或者
Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;Trusted_Connection=False;
可信连接:
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;或者
Server=myServerAddress;Database=myDatabase;Trusted_Connection=True;
2> Access连接字符串
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\myDatabase.mdb;User Id=admin;Password=;
3>MySQL连接字符串
Server=myServerAddress;Database=myDatabase;Uid=myUsername;Pwd=myPassword;
4>DB2连接字符串
Server=myAddress:myPortNumber;Database=myDatabase;UID=myUsername;PWD=myPassword;
5>Oracle连接字符串
Data Source=TORCL;User Id=myUsername;Password=myPassword;
几种连接不同数据库的ADO.NET字符串,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/llcdbk/p/3858556.html