• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 813
  • Last Modified:

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.
0
djlurch
Asked:
djlurch
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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


0
 
Mike EghtebasDatabase and Application DeveloperCommented:
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.

0
 
djlurchAuthor Commented:
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.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"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
0
 
djlurchAuthor Commented:
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.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"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
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
As mx as pretty much said, the reference will affect ONLY your application ... you can have several apps running side by side, all accessing the same data store, and all using different methods/versions ... for example, one can connect with 2.8, while another connects with 2.5 while still another connects with DAO. None of this will affect the data store (i.e. database) in any way.

ASP code is processed and generated on the server ... in other words, when ASP code calls for a library (like ADO) it's calling for that library on the SERVER and not the workstation - so the server would use whatever ADO reference that ASP requires. Your desktop wouldn't come into play ... the only thing your browser does is receive the results (which the server also processed and provided to your browser).

In short, you can set whatever reference you want on the desktop and have no affect whatsoever on ASP running on a server.

0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Tackle projects and never again get stuck behind a technical roadblock.
Join Now