Um provedor OLE DB não foi especificado no ConnectionString. 'Fornecedor = SQLOLEDB;
Estou tentando executar a consulta usando c #, estou recebendo o seguinte problema
Um provedor OLE DB não foi especificado no ConnectionString. Um exemplo seria, 'Provedor = SQLOLEDB;
meu código
string strConString = System.Configuration.ConfigurationManager.ConnectionStrings["WorkflowConnStr"].ConnectionString.ToString();
string sqlstr = "select * from table"
OleDbConnection myConnection = new OleDbConnection(strConString);
try
{myConnection.Open();}
catch (Exception err)
{ System.Diagnostics.Debug.WriteLine(err.Message); }
OleDbCommand myCommand = new OleDbCommand(sqlstr, myConnection);
OleDbDataReader reader = myCommand.ExecuteReader();
web.config
<add name="WorkflowConnStr" connectionString="Data Source=Server;Initial Catalog=DBName;user id=usr;password=password" providerName="System.Data.OleDb.OleDbConnection"/>
alguma sugestão ?