Solved

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

Posted on 2008-06-12
4
871 Views
Last Modified: 2011-09-20
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
Comment
Question by:jiaochao
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 21776533
Have you updated all your reference libraries in your VB6 app to reflect the new version of the Access being used?
0
 

Author Comment

by:jiaochao
ID: 21776848
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
 
LVL 77

Expert Comment

by:peter57r
ID: 21777379
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
 

Accepted Solution

by:
jiaochao earned 0 total points
ID: 21828706
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question