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
 

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