OleDb problems

  • Thread starter Thread starter John Young
  • Start date Start date
J

John Young

Hi, I've decided to post in here as the oledb ng seems to be very quiet.

I have some code here which keeps giving me an error 'Could not find
installable ISAM'
I have installed the Jet SP-7 update, and still get the same error. Any
ideas what I can do to resolve this issue.

Thank you for your time...

HERE'S THE CODE ROUTINE...
------------------------------------
private void frmMain_Load(object sender, System.EventArgs e)
{
string strAccessConn =
"Provider=Microsoft.Jet.OLEDB.4.0;DataSource=c:\\Thornleigh.MDB";
string strAccessSelect = "SELECT * from tableClientDetails";
myDataSet = new DataSet();
// Create the dataset and add the ClientDetails table to it
OleDbConnection myAccessConn = null;
try
{
myAccessConn = new OleDbConnection(strAccessConn);
}
catch(Exception x)
{
MessageBox.Show("Error: Failed to create a database connection.\n" +
x.Message);
return;
}
try
{
myAccessCommand = new OleDbCommand(strAccessSelect, myAccessConn);
myDataAdapter = new OleDbDataAdapter(myAccessCommand);
myAccessConn.Open();
myDataAdapter.Fill(myDataSet, "tableClientDetails");
}
catch(Exception x)
{
MessageBox.Show("Error: Failed to retrieve the required data from the
DataBase.\n" + x.Message);// ******* CODE ERROR HERE *******
return;
}
finally
{

myAccessConn.Close();
}
MessageBox.Show("finally opened");
}
 
The 'Could not find installable ISAM' usually indicates a problem with the
Connection String. Try putting a space between Data and Source in your
connection string.

Your new string should look like this:

string strAccessConn ="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\\Thornleigh.MDB";

Hope that works,

- Carl
 
Thanks for that, I'll try it..

John


Carl Fenley said:
The 'Could not find installable ISAM' usually indicates a problem with the
Connection String. Try putting a space between Data and Source in your
connection string.

Your new string should look like this:

string strAccessConn ="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\\Thornleigh.MDB";

Hope that works,

- Carl
 
Back
Top