Guest boskomihic Posted August 7, 2002 Posted August 7, 2002 Dim cn As New OleDb.OleDbConnection() cn.ConnectionString = _ "Provider=Microsoft.Jet.OLEDB.4.0;Password"";User ID=Admin;Data " & _ "Source=D:\My Documents\Visual Studio Projects\Adresar\Adresar.mdb" cn.Open() When I run this code I receive this exception: System.Data.OleDbException: Could not find installable ISAM. . . Is there anyone how can tall me what�s wrong with this ConnectionString? Thanks in advance! Quote
Guest Cogen Posted August 7, 2002 Posted August 7, 2002 I'm not sure about the method your using, but how about using ADO to connect to your datasource. You can do it with the following code ... Dim cn As Connection Set cn = New Connection With cn .Provider = "Microsoft.Jet.OLEDB.4.0" .ConnectionString = "User ID=Admin;Password=;" & _ "Data Source=YOURPATH;" & _ "Initial Catalog=YOURTABLE" .Open End With Actually, if your using other methods in the same project, the you will need to prefix your objects with ado... ADODB.Connection Quote
*Gurus* Thinker Posted August 7, 2002 *Gurus* Posted August 7, 2002 Is this ADO.Net? Quote Posting Guidelines
Guest Cogen Posted August 7, 2002 Posted August 7, 2002 huh? I'm pretty sure it will work in vb6. I put ADODB in front of the object incase he's using RDO or something else. Why, will my code not work? :( . I didn't test it. Quote
*Gurus* Thinker Posted August 7, 2002 *Gurus* Posted August 7, 2002 Sorry Cogen, I was asking if the original question was about ado.net. Quote Posting Guidelines
Guest boskomihic Posted August 7, 2002 Posted August 7, 2002 I suppose that this Cogen's example was VB6. I need to do this in VB.NET Quote
Guest Cogen Posted August 7, 2002 Posted August 7, 2002 Yes, my example was using VB6. Sorry to both of you for the confusion. I've never seen VB.net code before, and therefore didn't recognize it as such. Quote
Guest boskomihic Posted August 7, 2002 Posted August 7, 2002 I find what was a problem. When I cut out Password=""; everything goes just fine Quote
*Gurus* Thinker Posted August 7, 2002 *Gurus* Posted August 7, 2002 Makes sense. Even in ADO, you would say Password=; without the "" for a blank password. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.