我正在连接到 Access 2007 数据库:
oleConnection = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\...\Db.accdb");
连接到 SQL Server Express 2014 数据库的命名法是什么?
string connectionString =
"Provider=SQLOLEDB.1" + ";" +
"Integrated Security=SSPI" + ";" + //Windows authentication
"Persist Security Info=False" + ";" +
"User Instance=True" + ";" +
"Data Source=CTE-LAPTOP\SQLEXPRESS" + ";" +
"Initial Catalog=SqlServerDbExample" + ";" + //Database name
"AttachDBFilename=C:\..\SqlServerDbExample.mdf" + ""; //Filename
OleDbConnection oleConnection = new OleDbConnection(connectionString);