The VB Zone Discussion Board

Re(8): MDAC


Instead of using EARLY BINDING by referencing the "Microsoft ActiveX Data Objects" library, then creating an instance of the Connection class... try leaving the reference to the ADO library out and use LATE BINDING. Use the "CreateObject" function to create an instance of the Connection class on the fly:


Dim cnValidate As Object
Set cnValidate = CreateObject("ADODB.Connection", vbNullString)
With cnValidate
.Provider = strProvider
.ConnectionString = strDBLocation
.Open
End With


Make sure you use error checking to make sure that you actually got a valid reference to a Connection object when you called "Set cnValidate = CreateObject(..)".

Kevin



Replies:


You must register before you can post on this board. You can register here.

Post a reply:
Username:
Password:
Email:
Subject:
Message:
Link Name:




Click Here to view the "old"messageboard


MAIN | DOWNLOADS | SAMPLE CODE | STEP BY STEP | DISCUSSION BOARD | LINKS | AUTHOR
E-MAIL
























Create Your Own Free Message Board or Free Forum!
Hosted By Boards2Go Copyright © 2000-2013
Our Sites: Wedding address collection  Wedding thank you wording