[AccessD] Using Connection class

Drew Wutka DWUTKA at Marlow.com
Tue Jun 1 16:23:31 CDT 2010


So to use the class I posted in the Friday Puzzler thread:

 

Define a global variable as the connection class:

 

Public ISFEDatabaseConnection as DatabaseConnection

 

Then open it in starting code:

 

Set ISFEDatabaseconnection=New DatabaseConnection.

 

Then wherever you need to use the database connection:

 

Dim cnn as ADODB.Connection

....

ISFEDatabaseConnection.DBConnect cnn

....

 

'Use the database

.......

Cnn.ReleaseISFEDBConnection

Set cnn=nothing

 

And anywhere where you want to know what DB your connecting too:

 

ISFEDatabaseConnection.ISFEDatabaseTypeString

 

Drew


The information contained in this transmission is intended only for the person or entity 
to which it is addressed and may contain II-VI Proprietary and/or II-VI Business 
Sensitive material. If you are not the intended recipient, please contact the sender 
immediately and destroy the material in its entirety, whether electronic or hard copy. 
You are notified that any review, retransmission, copying, disclosure, dissemination, 
or other use of, or taking of any action in reliance upon this information by persons 
or entities other than the intended recipient is prohibited.



More information about the AccessD mailing list