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"

你可能感兴趣的:(oracle,sql,server,server,Microsoft,Security,sqlserver)