how to write connection string in web.config file for ms-Access OleDb proiver

Nov 14 2008 2:58 AM
below is my connection string in web.config file..
<connectionStrings>
    <add name="ConnectionString" connectionString="Provider=Microsoft.Jet.OleDb.4.0;DataSource={\App_Data\Dictionary.mdb};" providerName="System.Data.Oledb"></add>
  </connectionStrings>

i am accessing my connection string in my .aspx page as below:

OleDbConnection con = new
OleDbConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ToString());
and i am gatting following error  when i run the application
Could not find installable ISAM.

Server Error in '/' Application.

Could not find installable ISAM.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Could not find installable ISAM.

Source Error:

Line 30:             OleDbDataAdapter adpt = new OleDbDataAdapter("select * from WordMst", con);
Line 31:             DataSet ds = new DataSet();
Line 32:             adpt.Fill(ds);
Line 33:             gvWord.DataSource = ds;
Line 34:             gvWord.DataBind();

can anybody give me solution...  is it driver problem..?

Answers (6)