VC++ ADO access breaks from 2.1 to 2.5?!?

VC++ ADO access breaks from 2.1 to 2.5?!?

Post by dejanewsd.. » Tue, 22 Aug 2000 04:00:00



Data access through ADO (using #import "c:\program files\common
files\system\ado\msado15.dll" \)compiled on system with ADO 2.1SP2
worked fine on similar systems with 2.x and those with 2.5.  Upgraded
development system to 2.5 and now any system without 2.5 dies with
an "unknown error".  Please let me know if you have any further insight
and I will do the same.  Upgrading the client to MDAC 2.5 solves the
problem but we would like to avoid requiring this 10mb DL and install.
Since 2.1 worked on both it is definately possible.  The kicker is that
SP4 for VC++ requires MDAC 2.5 so going back is not an option.

Dave

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

VC++ ADO access breaks from 2.1 to 2.5?!?

Post by Anders Tornbla » Tue, 22 Aug 2000 04:00:00


You probably do something like this:

ADODB::_ConnectionPtr pConn;
pConn.CreateInstance(__uuidof(ADODB::_Connection));

This call to CreateInstance creates an instance (duh!) of an ADO
Connection object of the highest version number of the _compiler
machine_.

To rectify, write something like this instead:

ADODB::Connection15Ptr pConn;
pConn.CreateInstance(__uuidof(ADODB::Connection15));

,where "15" stands f?r ADO 1.5. You can put 20, 21 or 25 there instead,
I think.

/ Anders



> Data access through ADO (using #import "c:\program files\common
> files\system\ado\msado15.dll" \)compiled on system with ADO 2.1SP2
> worked fine on similar systems with 2.x and those with 2.5.  Upgraded
> development system to 2.5 and now any system without 2.5 dies with
> an "unknown error".  Please let me know if you have any further
insight
> and I will do the same.  Upgrading the client to MDAC 2.5 solves the
> problem but we would like to avoid requiring this 10mb DL and install.
> Since 2.1 worked on both it is definately possible.  The kicker is
that
> SP4 for VC++ requires MDAC 2.5 so going back is not an option.

> Dave

> Sent via Deja.com http://www.deja.com/
> Before you buy.

--
Anders Tornblad, Kajitsu Consulting
GIS, Microsoft, Web, and more...

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

VC++ ADO access breaks from 2.1 to 2.5?!?

Post by dejanewsd.. » Tue, 22 Aug 2000 04:00:00


Were using:

_ConnectionPtr pConn;
pConn.CreateInstance(__uuidof(_Connection));

Tried the following instead:

_Connection15Ptr pConn;
pConn.CreateInstance(__uuidof(_Connection15));

It compiled successfully , but hangs forever at runtime.

I tried this:

ADODB::_Connection15Ptr pConn;
pConn.CreateInstance(__uuidof(ADODB::Connection15));

But I got this error :
error C2653: 'ADODB' : is not a class or namespace name

Thanks for your time!



> You probably do something like this:

> ADODB::_ConnectionPtr pConn;
> pConn.CreateInstance(__uuidof(ADODB::_Connection));

> This call to CreateInstance creates an instance (duh!) of an ADO
> Connection object of the highest version number of the _compiler
> machine_.

> To rectify, write something like this instead:

> ADODB::Connection15Ptr pConn;
> pConn.CreateInstance(__uuidof(ADODB::Connection15));

> ,where "15" stands f?r ADO 1.5. You can put 20, 21 or 25 there
instead,
> I think.

> / Anders



> > Data access through ADO (using #import "c:\program files\common
> > files\system\ado\msado15.dll" \)compiled on system with ADO 2.1SP2
> > worked fine on similar systems with 2.x and those with 2.5.
Upgraded
> > development system to 2.5 and now any system without 2.5 dies with
> > an "unknown error".  Please let me know if you have any further
> insight
> > and I will do the same.  Upgrading the client to MDAC 2.5 solves the
> > problem but we would like to avoid requiring this 10mb DL and
install.
> > Since 2.1 worked on both it is definately possible.  The kicker is
> that
> > SP4 for VC++ requires MDAC 2.5 so going back is not an option.

> > Dave

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

> --
> Anders Tornblad, Kajitsu Consulting
> GIS, Microsoft, Web, and more...

> Sent via Deja.com http://www.deja.com/
> Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.