Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Unrecoginized format"?

Status
Not open for further replies.

JTeagle

Programmer
May 30, 2000
49
0
0
GB
I created a database in Access 2000. I tried to use the following code in VB 6.0 to open that database:

---
Dim wspDefault As Workspace
Dim DB As Database, DBSet As Recordset

' Grab the default workspace.
Set wspDefault = DBEngine.Workspaces(0)
' Open the database.
Set DB = wspDefault.OpenDatabase("c:\temp\xxx.mdb")
---

When I run it, though, it gives me error 3343: "Unrecognized database format".

Is this because VB does not have / know the correct Jet DLLs to access a database created in Access 2000? They must exist otherwise how is Access doing it... If this is the problem, how / where do I get the right files, and where do I put them? If not, what have I done wrong?
 
The easiest way to solve this is to go to msdn.microsoft.com and download the latest data access component (MDAC), version 2.6.

You will have to redistribute this with your application.

Chip H.
 
I think that DAO (what you uses) uses Access 97 databases and ADO, Access 2000 databases.

Maybe you can switch to ADO if the MDAC 2.6 solution didn't work...

good luck :)
 
After you download the lastest mdac you will need to make reference to the DAO 3.6 library istead of the DAO 3.51 Library. (ADO 2.5 library when using ADO instead of ADO 2.1).
David Paulson


 
ADO 2.5 did the trick - thanks everyone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top