ADO中数据库连接字符串的几种写法

MsSql连接:吐舌头

string  value= "Data Source=LocalHost;Initial Catalog=DbName;Integrated Security=SSPI";

string  value= "Data Source=TC019053;Initial Catalog=DbName;User ID=sa;Password=****";

string  value= "server=localhost;database=DbName;User ID=sa;Password=****";

string  value= "server=localhost;database=DbName;Integrated Security=SSPI";

MySql连接:生气

string value="server=localhost;database=DbName;user id=root;password='';pooling=false";

SQLite连接:鄙视

string value="Data Source=|DataDirectory|/DbName.s3db";

Access连接:难过

[2003] string value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|/MyDb.mdb;"

[2007]  string value="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|/MyDb.accdb;"

 

oracle连接:尴尬

string value="Data Source=ProjectOracle;password=****;user ID=system";

 

 

你可能感兴趣的:(数据库连接)