ADO.NET下的各种连接字符串

 收集了ADO.NET下四种Provider的连接串写法,记下来方便查找:

SQLSERVER:
"Persist Security Info=False;Integrated Security=SSPI;Initial Catalog=Northwind;server=(local)"
"Initial Catalog=Northwind;Data Source=(local);User ID=sa;Password=pwd"

ORACLE:
"Data Source=Oracle8i;user id=userid;password=pwd"
"Data Source=Oracle8i;Integrated Security=yes"

OLEDB:
"Provider=MSDAORA; Data Source=ORACLE8i7;Persist Security Info=False;Integrated Security=Yes"
"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:/bin/LocalAccess40.mdb"
"Provider=SQLOLEDB;Data Source=(local);Integrated Security=SSPI"

ODBC:
"Driver={SQL Server};Server=(local);Trusted_Connection=Yes;Database=AdventureWorks;"
"Driver={Microsoft ODBC for Oracle};Server=ORACLE8i7;Persist Security Info=False;Trusted_Connection=Yes"
"Driver={Microsoft Access Driver (*.mdb)};DBQ=c:/bin/Northwind.mdb"
"Driver={Microsoft Excel Driver (*.xls)};DBQ=c:/bin/book1.xls"
"Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=c:/bin"
"DSN=dsnname"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值