OpenDatabase Problem in VB

R

Roger Denison

I have an Access98 db that I converted to Access2000.
I'll call the databases DB98 and DB2000, respectively.

Now in my VB code I want to open a database so I use
something like:

Set dbMain = OpenDatabase(DB98).

When I do this I get something for dbMain. However if I
use:

Set dbMain = OpenDatabase(DB2000),

I get, in essence, 'dbMain = Nothing'.

I am modifying some existing VB code that was written to
work with the older 98 db. I made all the necessary name
changes so that the OpenDatabase method tries to open the
2000 db but I get nothing. I don't get any errors,
just 'nothing'.

What would cause this?

Roger.
 
T

TC

Probably not the answer, but: you should always qualify dbengine object
methods with the dbengine keyword - explicitly. Thus,
DBENGINE.opendatabase(). Otherwise, all sorts of strange DAO licencing &
other errors can occur in certain cases.

HTH,
TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top