REGDB_E_CLASSNOTREG(0x80040154).

  • Thread starter Thread starter raagz
  • Start date Start date
R

raagz

Hi,

I am trying to access an mdb file using C# in ASP.NET but i get this error..

No error information available: REGDB_E_CLASSNOTREG(0x80040154).

here goes my code:\
-------------------
string strConnection= "Provider=Microsoft.Jet.OleDb.4.o;";
strConnection+= @"Data source=D:\northwind.mdb";

OleDbConnection objConnection=new OleDbConnection(strConnection);
string strsql="select firstname,lastname from employees";
OleDbCommand objCommand = new OleDbCommand(strsql,objConnection);

objConnection.Open();
DataGrid1.DataSource= objCommand.ExecuteReader(CommandBehavior.CloseConnection);
DataGrid1.DataBind();
objConnection.Close();
 
It appears that your "Provider" string is incorrect. You are using an "o" where you require a "0" (zero). Provider=Microsoft.Jet.OleDb.4.0;";
 
Back
Top