CreateWorkspace

  • Thread starter Thread starter Mario Kropik
  • Start date Start date
M

Mario Kropik

Hello Ng,

I've a question concerning CreateWorkspace function call:

When I have referenced DAO 3.51 my function call
Set ws = CreateWorkspace("myWs", "","" , dbUseODBC)
works fine.

But when I reference to DAO 3.6 my function call throws an error "cannot
load DLL '?????L?'"
BUT it works with DbEngine.CreateWorkspace("myWs", "","" , dbUseODBC)

Access Version is A97, and MDAC 2.8 is installed.

Any ideas?

Thanks in advance for your help.

Mario
 
** All methods of the DBEngine object should be explicitly qualified with
the DBEngine keyword. **

This is due to an obscure DAO licencing issue.

Depending on whether you include that keyword or not, DAO is instantiated
differently (behind the scenes). Other affects of omitting that keyword can
be, inability to create an MDE.

Further information on this can be found by suitable googling.

HTH,
TC
 
Access Version is A97, and MDAC 2.8 is installed.

DAO 3.6 was released with Access 2000, but you say you've
created a reference to DAO 3.6 while using Access 97.
It seems you either have Access 97 and Access 2000 on your
machine or you have a copy of the file DAO360.DLL and have
pointed to it using the Browse button in the References dialog.

I've tested your code line:
Set ws = CreateWorkspace("myWs", "","" , dbUseODBC)
in Access 97 and Access 2000 referencing DAO 3.51 or
DAO 3.6 in both versions of Access. The code line works
fine in all combinations.

However, as you say the above code line doesn't work in
Access 97 when referencing the DAO 3.6 library (it does
work on my machine), are you sure you have the file
DAO360.DLL on your machine and that you've created a
reference to it? (You wouldn't be able to compile your
code without a DAO reference.)

On my machine DAO360.DLL is in the folder:
C:\Program Files\Common Files\Microsoft Shared\DAO

You say that using DbEngine makes the code line work.
But on my machine adding DbEngine makes no difference.
Your code line (without DbEngine) works with the DAO
reference - it doesn't work without the DAO reference.

Incidentally, the differences between DAO 3.51 and 3.6
are minimal.

HTH
Geoff
 
Back
Top