Link to home
Start Free TrialLog in
Avatar of jiaochao
jiaochao

asked on

ProgramWorkspace = DBEngine.CreateWorkspace("ProgramWorkspace", "ProgramUser", "federation") works for access 97, does not work for Access 2003

I used following VB6 code to run MS Access 97
ProgramWorkspace = DBEngine.CreateWorkspace("ProgramWorkspace", "ProgramUser", "federation")

After the MS Access is upgraded to 2003, this line of the code is not working any more. The Visual Basic Error message is:

Cant open database . It may not be a database that your application recognized, or the file may be corrupt.

What should it be for Access 2003?
DBEngine.SystemDB = App.Path + "\" + "system.mdw"
Set ProgramWorkspace = DBEngine.CreateWorkspace("ProgramWorkspace", "ProgramUser", "federation")

Open in new window

Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Have you updated all your reference libraries in your VB6 app to reflect the new version of the Access being used?
Avatar of jiaochao
jiaochao

ASKER

Hi Peter57r,
Thanks. It works for the system.mdw. When the code asks to access the Access database itself, I got following error:

Unrecognized database format "\\MCL-Srv1\vol1\networks\share\cmtce\tmsinfo\copy of nokia card data controller\ncdccode\current\log.mdb

Regards
Yes, I understand that...

so...
"Have you updated all your reference libraries in your VB6 app to reflect the new version of the Access being used?"
ASKER CERTIFIED SOLUTION
Avatar of jiaochao
jiaochao

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial