ADO In ATL Project,ADO Version,CreateInstance Failed 
Author Message
 ADO In ATL Project,ADO Version,CreateInstance Failed

I want ADO support for my ATL Project,
both in Win98 and Win2K etc.
But I was failed with bellow code:

CComPtr<Connection15> m_pConnection;
m_pConnection.CoCreateInstance(__uuid(Connection15))
and
_ConnectionPtr m_pConnection;
m_pConnection.CoCreateInstance("ADODB.Connection")

with code 0x80040154.
how to fix it?

why use this
because I want work both win98 and win2k



Tue, 12 Apr 2005 09:23:11 GMT  
 ADO In ATL Project,ADO Version,CreateInstance Failed
Hi,

Quote:

> I want ADO support for my ATL Project,
> both in Win98 and Win2K etc.
> But I was failed with bellow code:

> CComPtr<Connection15> m_pConnection;
> m_pConnection.CoCreateInstance(__uuid(Connection15))
> and
> _ConnectionPtr m_pConnection;
> m_pConnection.CoCreateInstance("ADODB.Connection")

> with code 0x80040154.
> how to fix it?

> why use this
> because I want work both win98 and win2k

Install an appropiate MDAC version on the client machines (version 2.5, 2.6 or
2.7)
Error 0x80040154 says "class not registered". So if you ask for
__uuidof(Connection15) that could fail because the clients MDAC is too old. If you
ask for progid "ADODB.Connection" that could IMO only fail when no MDAC is
installed on the client.

HTH,
Sven



Tue, 12 Apr 2005 17:51:17 GMT  
 ADO In ATL Project,ADO Version,CreateInstance Failed
Connection15 is the very old version at all.all other Connection interface
are based on Connection15.
and I look in register database for "Connection15" register information
success.
what can I do.
thanks!


Quote:
> Hi,




Quote:
> > I want ADO support for my ATL Project,
> > both in Win98 and Win2K etc.
> > But I was failed with bellow code:

> > CComPtr<Connection15> m_pConnection;
> > m_pConnection.CoCreateInstance(__uuid(Connection15))
> > and
> > _ConnectionPtr m_pConnection;
> > m_pConnection.CoCreateInstance("ADODB.Connection")

> > with code 0x80040154.
> > how to fix it?

> > why use this
> > because I want work both win98 and win2k

> Install an appropiate MDAC version on the client machines (version 2.5,
2.6 or
> 2.7)
> Error 0x80040154 says "class not registered". So if you ask for
> __uuidof(Connection15) that could fail because the clients MDAC is too
old. If you
> ask for progid "ADODB.Connection" that could IMO only fail when no MDAC is
> installed on the client.

> HTH,
> Sven



Fri, 15 Apr 2005 10:42:30 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ODBC-SDK, DAO, ADO ? // ADO: doc, version

2. Adding ADO support in ATL project

3. ADO: CreateInstance on ConnectionPtr.

4. ADO CreateInstance ???

5. ADO CreateInstance problem

6. ADO Record Set CreateInstance Doesn't Work ??!!

7. CreateInstance failing in nt service..(ATL)

8. ADO.NET sure is long-winded compared to old ADO

9. how to display data source in several pages in ado.net like i do in ado

10. Much ADO about nothing?--Oracle BLOBs and ADO 2.0

11. ADO Data control bind to ADO DataGrid

12. Using ADO 2.1 / ADOX / ADO 2.0 with C++

 

 
Powered by phpBB® Forum Software