ESQL/C 5.01.WC1 for Windows 3.1 and SetConnect() -Problem
Posted in 1995
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi all, Here is the problem I am facing. 1. Call GetConnect() to get a connection handle to a server. 2. Open a database under this handle. 3. Call GetConnect() to another connection handle to same/another server. 4. Open a database under this handle. 5. Call SetConnect() to switch to the first handle (which is gotten in step 1) 6. Close the database and call ReleaseConnect() to release this handle. Here is the problem if I go to second handle 7. Call SetConnect() to switch to the second handle (which is gotten in step 3). SetConnect() fails and returns a NULL pointer though the handle passed to it is correct. Furthermore, If call SetConnect() again after above failure with same handle, it would succeed and switch the connection and everything works fine. So why is SetConnect(handle2) failing, If called after ReleaseConnect(handle1) and why is it succeeding if called again after the first failure. Any help, pointers to help would be greatly appreciated. Thanks a lot in advance -raj