borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Retrieving fieldnames)Next Topic (select statements) New Topic New Poll Post Reply
AndreaVB Forum : Database : ADO & MS Access
Poster Message
sunflower
Level: Guest


icon ADO & MS Access  Archived to Disk

Hi,
I have a scenario where I need to open a table in MS Access 2000 using AD0.  But when I try to open it up, it says it's an unrecognized database, or an unrecognized format.  Does anyone know why that might be?
Below is how I'm opening the file.  

I've also been unable to solve the problem of creating a new database right from VB using ADO.  Can anyone please offer some insight on that?


connectString = "Provider=Microsoft.Jet.OLEDB.3.51;"  & "Data Source=filestructure04.mdb"
adoConnection.Open connectString
adoRecordset.Open "struct04", adoConnection

Thanks

03-08-2002 at 12:15 AM
| Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1618
icon Re: ADO & MS Access  Archived to Disk

Not completely certain, but it may need to be:

Microsoft.Jet.OLEDB.4.0

Although if you add a ADODC1 control on a form, use the connection string building function to create the string (using the newest/highest numbered Jet), and test to see if you can connect.

Although the DB may need repairing.

03-08-2002 at 05:10 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
ASHISH25
Level: Guest

icon Re: ADO & MS Access  Archived to Disk


hi

In access 2000 use Provider=Microsoft.Jet.OLEDB.4.0
otherwise your code is ok

03-08-2002 at 11:59 AM
| Quote Reply
sunflower
Level: Guest

icon Re: ADO & MS Access  Archived to Disk

Thanks guys...it worked.  

05-08-2002 at 01:18 AM
| Quote Reply
ASHISH25
Level: Guest

icon Re: Re: ADO & MS Access  Archived to Disk

use provider 4.0

09-08-2002 at 10:02 AM
| Quote Reply
AndreaVB Forum : Database : ADO & MS Access
Previous Topic (Retrieving fieldnames)Next Topic (select statements) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder