Link to home
Start Free TrialLog in
Avatar of djlurch
djlurch

asked on

How will adding a VBA reference to ADO 2.8 affect my database?

I am using Access 2003 with some VBA code. The VBA code accesses the data from an ADODB.Connection call. To enable this in my testing environment I need to go to Tools -> References and select one of the MS ADO references to get that line of code to work.

Does doing this affect only that one Form object or does the reference become active for the entire database.

Really my concern is this. The database is heavily used in a Classic ASP/IIS environment. I do not want this reference to override what the ASP processor is using to process the SQL code. Also, I don't want to open up some sort of additional vulnerability.

I'm a newbie to VBA and am unclear of the ramifications of adding the reference are.
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

The reference does not do anything until you refer to it in code.... for example:

Dim conn As ADODB.Connection  

Same for DAO.

Dim db As DAO.Database

You can used both even in the same code ... *as long as you prefix each object*

mx


Adding a reference the current project. If, for example, you start a blank database and import all forms, tables, etc. to this new database the refrences used need to be added again.

Avatar of djlurch
djlurch

ASKER

MX:

I'm not sure that is definitive. In the ASP code I use an ADODB connection. My concern is that the internal (desktop interface) setting will over-ride the IIS/ASP processor and use the referenced ADO instead.
"Does doing this affect only that one Form object or does the reference become active for the entire database."

Yes ... for the entire database.

mx
Avatar of djlurch

ASKER

MX:

Got it. But again, will this override which ADO choice the ASP processor will use? Does it matter?

In the Access VBA interface I am selecting MS ADO 2.8 which appears to be the latest ADODB version from MS.
"But again, will this override which ADO choice the ASP processor will use? Does it matter?"

I don't know the answer to that ...

mx
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial