常用连接字符串
详细说明见http://www.connectionstrings.com
举一些常用的例子
连接access数据库
用odbc来连接
Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;
用oleDB来连接
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;User Id=admin;Password=;
连接sql2000
用SqlConnection连接
(一)标准方式
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
(二)可信任连接Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
(三)通过IP地址Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;