如何为OleDbConnection
创建连接字符串?我尝试了很多组合和变体,但没有任何效果。我使用带有C#的MS-SQL平台为SQL EXPRESS建立连接。
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Data\Northwind.mdb;User Id=admin;Password=;
Data Source=(local);Provider=SQLOLEDB;Initial Catalog=FastCycle;Integrated Security=true
Persist Security Info=False;Data Source=Northwind;Integrated Security=SSPI;Trusted_Connection=TRUE;providerName=System.Data.OleDb
Provider=SQLOLEDB;Data Source=Northwind.mdb
Provider=SQLEXPRESS;Data Source=Northwind.MDB
答案 0 :(得分:0)
@paddy向我推荐了这个网站connectionstrings.com。它帮助我找到正确的字符串。那是:
Provider=sqloledb;Data Source=.\SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=SSPI;