Sessions & Connections > Extending the IldDbms Class
 
Extending the IldDbms Class
It is not possible to derive from the class IldDbms because the actual objects handled by your application are instances of its subclasses rather than instances of the base class.
If, for any reason, you need to extend the functionality of the IldDbms class, you can retrieve the determining part for connection handling. The member function IldDbms::getHook returns that part as a void pointer.
Table 3.6 shows what this function returns and what proprietary client interface you can call, depending on the target database system.
Values Returned by the Member Function IldDbms::getHook
With this Database System...
...the getHook function returns
...and lets you call the following database proprietary client interface.
DB2
the SQLHANDLE
CLI (Call Level Interface)
Informix
the connection name (a character string)
Embedded SQL
MS SQL Server
the pointer to the DBPROCESS structure
DB Library function
ODBC
the HDBC
ODBC functions
OLE-DB
the pointer to the IDBCreateSession structure
OLE-DB functions
Oracle9, 10 or 11
the pointer to the OCISvcCtx structure
OCI functions
Sybase
the pointer to the CS_CONNECTION structure
Client Library functions
On the other hand, the member function IldDbms::setHook may be used to initialize the connection with an existing connection from an other application.
The IldDbms instance must be disconnected before using this function.
The connection given will not be closed when calling ~IldDbms(), or when calling IldDbms::disconnect(). Since it was allocated outside of Rogue Wave DB Link, the application is responsible for closing it.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.