数据连接字符串

SqlServer
(1)ODBC
Driver={SQL Server};Server=Aron1;Database=pubs;Uid=sa;Pwd=asdasd;
Driver={SQL Server};Server=Aron1;Database=pubs;Trusted_Connection=yes;

oConn.Properties("Prompt") = adPromptAlways
oConn.Open "Driver={SQL Server};Server=Aron1;DataBase=pubs;"
(2)OLE DB, OleDbConnection (.NET)
Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;
Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;

oConn.Provider = "sqloledb"
oConn.Properties("Prompt") = adPromptAlways
oConn.Open "Data Source=Aron1;Initial Catalog=pubs;"

Provider=sqloledb;Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog= pubs;UserID=sa;Password=asdasd;
(3)SqlConnection (.NET)
Data Source=Aron1;Initial Catalog= pubs;UserId=sa;Password=asdasd;
Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;"
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog= pubs;UserID=sa;Password=asdasd;

Access
(1)ODBC
Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;
Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;SystemDB=C:\mydatabase.mdw;
Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Exclusive=1;Uid=admin;Pwd=
(2)OLE DB, OleDbConnection (.NET)
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User Id=admin;Password=;
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:System Database=system.mdw;
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:Database Password=MyDbPassword;

Oracle
(1)ODBC
Driver={Microsoft ODBC for Oracle};Server=OracleServer.world;Uid=Username;Pwd=asdasd;
Driver={Microsoft ODBC Driver for Oracle};ConnectString=OracleServer.world;Uid=myUsername;Pwd=myPassword;
(2) OLE DB, OleDbConnection (.NET)
Provider=msdaora;Data Source= MyOracleDB;UserId=UserName;Password=asdasd;
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=Username;Password=asdasd;
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;OSAuthent=1;
(3)OracleConnection (.NET)
Data Source=Oracle8i;Integrated Security=yes
(4)Core Labs OraDirect (.NET)
User ID=scott; Password=tiger; Host=ora; Pooling=true; Min Pool Size=0;Max Pool Size=100; Connection Lifetime=0
(5)Data Shape
Provider=MSDataShape.1;Persist Security Info=False;Data Provider=MSDAORA;Data Source= orac;userid=username;password=mypw

DSN
DSN=myDsn;Uid=username;Pwd=;" 
FILEDSN=c:\myData.dsn;Uid=username;Pwd=;

Excel
Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=C:\MyExcel.xls;DefaultDir=c:\mypath;
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""

Text
Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:\txtFilesFolder\;Extensions=asc,csv,tab,txt;
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\txtFilesFolder\;ExtendedProperties=""text;HDR=Yes;FMT=Delimited""

 

 

 


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值