• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 943
  • Last Modified:

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

0
jiaochao
Asked:
jiaochao
  • 2
  • 2
1 Solution
 
peter57rCommented:
Have you updated all your reference libraries in your VB6 app to reflect the new version of the Access being used?
0
 
jiaochaoAuthor Commented:
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
0
 
peter57rCommented:
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?"
0
 
jiaochaoAuthor Commented:
Many thanks peter57r. I understand what you are saying. I tried all possiable references with different seq. At the end I decide to change my method. Instead of using the ADO or DAO to create tables and fields, I am now pre-set a MS Access template with all the structures. I will replication my sql database into this template to make the replicate database. It works find. Thanks again for your attension. Cheers
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now