Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with ADO.

Status
Not open for further replies.

WilliamGS

Programmer
Jan 21, 2004
54
PE
Hi all. I have an app (VC 6.00) that works with an Access database and ADO, this app has worked fine, but it has problems only in one PC. My code is:

CoInitialize(NULL);
_ConnectionPtr con(__uuidof(Connection));
con->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbTest.mdb"); //Here is the problem!!!!!
//...

'con->Open()' shows the error: "Null Pointer"
It seems that '_ConnectionPtr con(__uuidof(Connection))' did not work fine.

This happens only in one PC.
How can I solve this problem? Where is ADO installers for download?

Thanks in advance.

William GS
 
__uuidof(Connection) will return the UUID of the Connection object for the version of the ADO library that is on the computer you built the app on. (That imported by the #import statement you used)

Is is most likely that _uuidof(Connection) cannot be found on the machine you are having the problem with either because ADO objects are not installed, or the installed version is earlier that that used for your build.

To get current ADO
Another option is to use an earlier build of ADO on your development machine.

Probably numerous other options such as using functions to get the currently registerd Connection object by using the object name rather than the UUID directly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top