ADO 连接字串一网打尽
ODBC DSNLess Connections:
MS Access ODBC DSNless connection
Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\somepath\dbname.mdb;Uid=Admin;Pwd=pass;
dBase ODBC DSNless connection
Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=c:\somepath\dbname.dbf;
Oracle ODBC DSNless connection
Driver={Microsoft ODBC for Oracle};Server=OracleServer.world;Uid=admin;Pwd=pass;
MS SQL Server DSNless connection
Driver={SQL Server};Server=servername;Database=dbname;Uid=sa;Pwd=pass;
MS Text Driver DSNless connection
Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:\somepath\;Extensions=asc,csv,tab,txt;Persist Security Info=False;
Visual Foxpro DSNless connection
Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB=c:\somepath\dbname.dbc;Exclusive=No;
MySQL DSNless connection
driver={mysql}; database=yourdatabase;server=yourserver;uid=username;pwd=password;option=16386;
OLE DB Connections:
MS Access OLE DB connection
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\somepath\dbname.mdb;User Id=admin;Password=pass;
Oracle OLE DB connection
Provider=OraOLEDB.Oracle;Data Source=dbname;User Id=admin;Password=pass;
MS SQL Server OLE DB connection
Provider=SQLOLEDB;Data Source=machineName;Initial Catalog=dbname;User ID=sa;Password=pass;
MS SQL Server OLE DB connection using an IP address
Provider=SQLOLEDB; Data Source=xx.xx.xx.xx,1433; Network Library=DBMSSOCN; Initial Catalog=dbname;User ID=sa;Password=pass;
MS Text Driver OLE DB connection
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\yourpath;Extended Properties='text;FMT=Delimited'"