SetConnect/GetConnect in ESQL/C for Windows 5.01
Posted in 1994
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi all, Does anybody know how to use the SetConnect and GetConnect functions in Informix-ESQL/C for Windows 5.01? The following code is a simple example of the problem I'm having: #include <sqlproto.h> void TestConnect() { void far *lpvConn1; void far *lpvConn2; void far *lpvSetConnRet; /* set up connection 1 */ lpvConn1 = GetConnect(); /* set up connection 2 */ lpvConn2 = GetConnect(); /* switch connection to connection 1 */ lpvSetConnRet = SetConnect(lpvConn1); } The two calls to GetConnect succeed, but when I call SetConnect with the pointer returned from the first GetConnect call, it returns a pointer equal to the pointer returned by the second GetConnect call. According to the documentation on page 8-14 of the Programmer's Manual, a successful SetConnect call will return a pointer equal to the pointer passed to it. Does anyone know what I'm doing wrong here? Thanks, Tim +----------------------------------+-----------------------------------+ | Tim Wills | TASC | | wills@dweezil.read.tasc.com | 55 Walkers Brook Drive | | (617)942-2000 x2008 | Reading, MA 01867 | +----------------------------------+-----------------------------------+