Click to See Complete Forum and Search --> : Database Access with CurrentDb


musa
May 20th, 1999, 06:15 AM
Hi friends,

In VB, there is a function called 'CurrentDb' which allowes you to use directly the database opened in MS Access.

Consider the following code written in VB

Dim myDB as Database
Set myDB = CurrentDb

Suppose the MS Access is running and some 'xyz.mdb' file is opened in it.
This code will assign the reference of xyz.mdb file to myDB and myDB can be used for normal database operations.
The statement "Set myDB = CurrentDb" is equivalent to OpenDatabase("xyz.mdb") in Vb.

CurrentDb is a function available with MS Access.

But I want to use the same functionality in VC++. So can any one help me out to solve this problem.

Musa