|
-
February 11th, 2005, 09:54 AM
#1
Error in connection: could not find installable ISAM [RESOLVED]
I have followed the solution my Microsoft and other sites none work.
here is my code
Code:
private void tbPunch_Click(object sender, System.EventArgs e)
{
String conString = " ";
try
{
//contructor accepts the database path
conString=@"Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\Documents and Settings\Me\My Documents\Visual Studio Projects\DB\testDB.mdb";
DataSet oDS = new DataSet();
con = new OleDbConnection(conString);
con.Open(); ***** this is where the error is
OleDbDataAdapter myDataAdapter = new OleDbDataAdapter();
myDataAdapter = new OleDbDataAdapter("Select * From clockTable", con);
OleDbCommandBuilder myCmdBuilder = new OleDbCommandBuilder(myDataAdapter);
myDataAdapter.Fill(myDtPunch);
this.ShowCurrentRecord();
}
catch (Exception ex)
{
MessageBox.Show("conString = " + conString + " Error in connection : "+ex.Message);
}
finally
{
// dispose of open objects
if (con != null)
con.Close();
} //finally
}
private void ShowCurrentRecord()
{
if (myDtPunch.Rows.Count==0)
{
test1.Text = "No Entries";
test2.Text = "No Entries";
return;
}
test1.Text = myDtPunch.Rows[rowPosition]["IDnum"].ToString();
test2.Text = myDtPunch.Rows[rowPosition]["position"].ToString();
}
Anyone know how to fix this, its put a huge halt in me continuing,
thanks
Last edited by Ctwizzy; February 11th, 2005 at 12:39 PM.
Reason: Resolved
-
February 11th, 2005, 10:11 AM
#2
Re: Error in connection: could not find installable ISAM
-
February 11th, 2005, 10:13 AM
#3
Re: Error in connection: could not find installable ISAM
could not find installable ISAM
-
February 11th, 2005, 11:15 AM
#4
Re: Error in connection: could not find installable ISAM
Solved Your Problem ?
Your Connection String is wrong ....
wrong :
Code:
conString = @"Provider=Microsoft.JET.OLEDB.4.0;DataSource=.....";
correct : --
Code:
conString = @"Provider=Microsoft.JET.OLEDB.4.0;Data Source=.....";
Last edited by Amit_Roy; February 11th, 2005 at 11:19 AM.
-
February 11th, 2005, 11:21 AM
#5
Re: Error in connection: could not find installable ISAM
Ill give that a try.
A lot of the tutorial sites and books i read all say DataSource which is odd if it doesnt work. Plus the error generated suggests that it a wrong error should say something like : ERROR: invalid connection string.
Ill let you know how it works out.
-
February 11th, 2005, 11:24 AM
#6
Re: Error in connection: could not find installable ISAM
BTW you have created one object and then another
Code:
OleDbDataAdapter myDataAdapter = new OleDbDataAdapter();
myDataAdapter = new OleDbDataAdapter("Select * From clockTable", con);
Code:
OleDbDataAdapter myDataAdapter = new OleDbDataAdapter("Select * From clockTable", con);
-
February 11th, 2005, 11:36 AM
#7
Re: Error in connection: could not find installable ISAM
Thanks again.
Im learning ADO.net from web tutorials, cant find a decent one yet so if anyone can recommend a good site to get me up to speed on using ADO.NET to do things such as
Query Selects
modify
insert
Remove
Display data
Display data in a dtagrid
anything else of importance.
Thanks
-
February 11th, 2005, 12:05 PM
#8
Re: Error in connection: could not find installable ISAM
That did the trick thanks a ton.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|