Solved

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

Posted on 2008-06-12
4
839 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
  • 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now