ADO connection ??

M

Michael

Within an Access application, how do you connect to your own database with
ADO.

In DAO I would write
Dim db as Database
Set db = Currentdb()

What is the ADO equivalent of this?
 
J

Joshua A. Booker

Michael,

Dim cnn as New ADODB.Connection
Set cnn = CurrentProject.Connection

HTH,
Josh
 
M

Michel Walsh

Hi,


But since you can share the current one, just using
CurrentProject.Connection is preferred to create a new one.... and it does
not have the problems of ephemerid existence that CurrentDb has.



Hoping it may help,
Vanderghast, Access MVP
 
Top