An OLE DB Provider was not specified in the ConnectionString. 'Provider=SQLOLEDB;

前端 未结 2 1897
执笔经年
执笔经年 2020-12-20 23:02

i trying to run query using C#, i am getting the following problem

An OLE DB Provider was not specified in the ConnectionString. An example would be,

相关标签:
2条回答
  • 2020-12-20 23:41

    Use SqlConnection instead of OleDbConnection.

    0 讨论(0)
  • 2020-12-20 23:46

    Try adding this to your connection string,

    Provider=SQLNCLI10.1
    

    So it would be;

    <add name="WorkflowConnStr" connectionString="Data Source=Server;Initial Catalog=DBName;user id=usr;password=password;Provider=SQLNCLI10.1" providerName="System.Data.OleDb.OleDbConnection"/>
    
    0 讨论(0)
提交回复
热议问题