首页 > 开发 > 综合 > 正文

各种数据源的ConnectString【转】

2024-07-21 02:52:05
字体:
来源:转载
供稿:网友

[转]各种数据源的ConnectString一览:

Table of Connection Strings

DBConnection String
accessAccess ODBC Connection String Driver
{Microsoft Access Driver (*.mdb)};Dbq=C:/demo.mdb;Uid=Admin;Pwd=;
Access OLEDB Connection String Driver
PRovider=Microsoft.Jet.OLEDB.4.0;Data Source=/directory/demo.mdb;User Id=admin;PassWord=;
DB2DB2 ODBC Connection String
driver={IBM DB2 ODBC DRIVER};Database=demodb;hostname=myservername;port=myPortNum;protocol=TCPip; uid=myusername; pwd=mypasswd
DB2 OLEDB Connection String
Provider=IBMDADB2;Database=demodeb;HOSTNAME=myservername;PROTOCOL=TCPIP;PORT=50000;uid=myusername;pwd=mypasswd;
DBaseDBase ODBC Connection String
Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=c:/directory;
DBase OLEDB Connection String
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:/directory;Extended Properties=dBASE IV;User ID=Admin;Password=
ExcelExcel ODBC Connection String
Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=C:/MyExcel.xls;DefaultDir=c:/directory;
Excel OLEDB Connection String
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/MyExcel.xls;Extended Properties='"Excel 8.0;HDR=Yes;IMEX=1"'
ExchangeExchange OLEDB Connection String
oConn.Provider = "EXOLEDB.DataSource" oConn.Open = "http://myServerName/myVirtualRootName"
FirebirdFirebird ODBC Connection String
DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=mypasswd;DBNAME=c:/directory/demo.fdb
Firebird OLEDB Connection String
User=SYSDBA;Password=mypasswd;Database=demo.fdb;DataSource=localhost;Port=3050;Dialect=3;Charset=NONE;Role=;Connection lifetime=15;Pooling=true;MinPoolSize=0;MaxPoolSize=50;Packet Size=8192;ServerType=0
FoxProFoxPro ODBC Connection String
Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB=c:/demo.dbc;Exclusive=No;NULL=NO;Collate=Machine;BACKGROUNDFETCH=NO;DELETED=NO
FoxPro OLEDB Connection String
Provider=vfpoledb.1;Data Source=c:/directory/demo.dbc;Collating Sequence=machine
InformixInformix ODBC Connection String
Driver={Informix-CLI 2.5 (32 Bit)};Server=demoservername;Database=demodb;Uid=myusername;Pwd=mypasswd
Informix OLEDB Connection String
Provider=Ifxoledbc.2;User ID=myusername;password=mypasswd;Data Source=demodb@demoservername;Persist Security Info=true
MySQLMySQL ODBC Connection String
DRIVER={MySQL ODBC 3.51 Driver};SERVER=myservername;PORT=3306;DATABASE=mydemodb; USER=myusername;PASSWORD=mypasswd;OPTION=3;
MySQL OLEDB Connection String
Provider=MySQLProv;Data Source=mydemodb;User Id=myusername;Password=mypasswd;
OracleOracle ODBC Connection String
Driver={Microsoft ODBC for Oracle};Server=myservername;Uid=myusername;Pwd=mypassword;
Oracle OLEDB Connection String
Provider=msdaora;Data Source=mydemodb;User Id=myusername;Password=mypasswd;
Oracle .Net Connection String
Data Source=mydemodb;User Id=myusername;Password=mypasswd;Integrated Security=no;
SQL ServerSQL Server ODBC Connection String - Database Login
Driver={SQL Server};Server=myservername;Database=mydemodb;Uid=myusername;Pwd=mypasswd;
SQL Server ODBC Connection String - Trusted Connection
Driver={SQL Server};Server=mysername;Database=mydemodb;Trusted_Connection=yes;
SQL Server OLEDB Connection String - Database Login
Provider=sqloledb;Data Source=myservername;Initial Catalog=mydemodb;User Id=myusername;Password=mypasswd;
SQL Server OLEDB Connection String - Trusted Connection
Provider=sqloledb;Data Source=myservername;Initial Catalog=mydemodb;Integrated Security=SSPI;
SQL Server .Net Connection String - Database Login
Server=myservername;Database=mydemodb;User ID=myusername;Password=mypasswd;Trusted_Connection=False
SQL Server .Net Connection String - Trusted Connection
Server=myservername;Database=mydemodb;Integrated Security=SSPI;
SybaseSybase ODBC Connection String
Driver={SYBASE ASE ODBC Driver};Srvr=myservername;Uid=myusername;Pwd=mypasswd
Sybase OLEDB Connection String
Provider=Sybase.ASEOLEDBProvider;Server Name=myservername,5000;Initial Catalog=mydemodb;User Id=myusername;Password=mypassword
原文参见:http://blog.csdn.net/yufei_yxd/article/details/5510593
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表