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!

Problem Connecting With Jet

Status
Not open for further replies.

Shake412

Programmer
Apr 17, 2002
55
0
0
GB
I'm writting a VB5 app on XP Home Edition and am having trouble connecting to a Jet DB. Using the CreateDatabase method I can create a database, then create a table and populate it fine.

But when I close it and try to access in code simply using

Set ws = CreateWorkspace(0) or ("", "admin", "", dbUseJet)
Set db = ws.OpenDatabase(strDatabasePath)

I get a Select Data Source dialog box. If I choose an Access machine DSN then I get an 3423 error (You cannot use ODBC to import from, export to or link an external Microsoft Jet or ISAM database to your table). I also get this error if I try to use an ODBC connection string in the OpenDatabase method.

Is there no ODBC on XP Home? How to I connect to my DB?

Thanks
Paul
 

Your code looks correct, I would check the contents of strDatabasePath, you would get a diaglog box if that was an empty string.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top