ADO and ODBC connection handle 
Author Message
 ADO and ODBC connection handle

Hi

I am converting a lot of code using RDO, the new access method would be ADO.
Many functions uses ODBC API calls and I would prefer not to change those
functions. One problem is that those API calls needs a ODBC connection
handle and I have not found anything about connection handles in ADO. For
example

SQLRETURN SQLGetFunctions(
     SQLHDBC     ConnectionHandle,
     SQLUSMALLINT     FunctionId,
     SQLUSMALLINT *     SupportedPtr);

Is it possible to get a ConnectionHandle from ADO? In RDO the property hDbc
was used.

Best regards
/Niklas



Fri, 01 Oct 2004 15:29:02 GMT  
 ADO and ODBC connection handle
As far as I know, no, there is no way. The reason is that ADO / OLEDB knows
nothing about ODBC and its handles. The only relationship between ADO/OLEDB
and ODBC is the existence of an OLEDB Provider for ODBC drivers, but that's
all.

So, you should search the way of ADO for things that you do in RDO. You can
post specific questions if you dont find the equivalence.

--
Best regards,

Carlos J. Quintero

MZ-Tools 3.0 freeware 'all-in-one' Add-In for VB6 and VBA: Code Templates,
Detect dead code, Favorite Procedures, Favorite Projects, External
Utilities, XML Documentation,  Private Clipboards, Select Case Assistant,
Sort Procedures, Collapse Projects, Split/Combine Lines, Open Folder of
File, Edit File As Text, MsgBox Assistant, Connect String Assistant and many
more features:
www.mztools.com


Quote:
> Hi

> I am converting a lot of code using RDO, the new access method would be
ADO.
> Many functions uses ODBC API calls and I would prefer not to change those
> functions. One problem is that those API calls needs a ODBC connection
> handle and I have not found anything about connection handles in ADO. For
> example

> SQLRETURN SQLGetFunctions(
>      SQLHDBC     ConnectionHandle,
>      SQLUSMALLINT     FunctionId,
>      SQLUSMALLINT *     SupportedPtr);

> Is it possible to get a ConnectionHandle from ADO? In RDO the property
hDbc
> was used.

> Best regards
> /Niklas



Fri, 01 Oct 2004 16:06:36 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ADO - PELogOnSQLServerWithPrivateInfo() Handle to database connection

2. ADO Guru: How do I get connection handle?

3. ADO connection Handle?

4. How to display ADO odbc-connection result?

5. ADO with ODBC connection running in Browser

6. ADO connection w/ ODBC

7. ODBC Connection To Oracle from VB/ADO

8. DAO and ADO connection for ODBC Oracle Databases

9. Stored procedure error using ADO/ODBC connection - help?

10. odbc connection/ado recordset not filling

11. ODBC Connection To Oracle from VB/ADO

12. ADO connection... ODBC or OLE driver

 

 
Powered by phpBB® Forum Software