常用几种数据库连接字符串

Microsoft SQL server

windows安全登陆

"Data Source=(local); Initial Catalog=Northwind; Integrated Security=True;"

SQL Server登陆

"Data Source=(local); Initial Catalog=Northwind; UserID=sa; PassWord=111111;"

Access

"Provider=Microsoft.jet.oledb.4.0; Data Source=d:\myDB.mdb"

Excel

"Provider=Microsoft.jet.oledb.4.0; Data Source=d:\myExcel.xls; Extended Properties=Excel8.0"

原文地址:https://www.cnblogs.com/hailexuexi/p/1784645.html