VS2005连接Sql2005,Sql2000,Access,Oracle四种数据库的字符串
1.Sql server2005 Data Server=.\SQLEXPRESS;Initial Catalog=Northwind;User ID=sa;Password=sa123456 Data Server=服务器名\SQLEXPRESS;Initial Catalog=Northwind;User ID=sa;Password=sa123456 Data Server=localhost\SQLEXPRESS;Initial Catalog=Northwind;User ID=sa;Password=sa123456 Data Server=.;Initial Catalog=Northwind;User ID=sa;Password=sa123456 Data Server=服务器名;Initial Catalog=Northwind;User ID=sa;Password=sa123456 以上五种字符串针对不同的SQL 2005版本 string source = @" Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source = D:c#connDBschool.mdb"; string source = @" server = .kingsql;database = Northwind ; uid = sa; pwd = sa "; (1)ODBC(要求:Oracle Client 7.3以上版本) (2)OLEDB(要求:Oracle Client 8i以上版本) (3)System.Data.OracleClient(要求:MDAC 2.6Oracle Client 8i Release 3 (8.1.7) 以上版本) (4)ODP.NET(要求:Oracle Client 9i以上版本) (5)OraDirect .net (要求:不需要安装Oracle客户端必须购买许可证)
|