连接到 SQL Server Express 2014 数据库的命名法是什么



我正在连接到 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);

相关内容

  • 没有找到相关文章

最新更新