![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all, I am programming Sybase using ct-library version 12.5. While executing the cs_ctx_alloc command it results into an error returning CS_FAIL. The command that i am excuting is as follows. retcode = cs_ctx_alloc (CS_VERSION_125,cntx_ptr ); RETURN_IF( retcode, "cs_ctx_alloc "); the command return 0(CS_FAIL). The version of sybase that is installed is 12.5. Can anyone help me to find the cause of this problem. |
#3
| |||
| |||
|
|
On Fri, 09 Jul 2004 05:32:33 -0700, Amol Natekar wrote: Hi all, I am programming Sybase using ct-library version 12.5. While executing the cs_ctx_alloc command it results into an error returning CS_FAIL. The command that i am excuting is as follows. retcode = cs_ctx_alloc (CS_VERSION_125,cntx_ptr ); RETURN_IF( retcode, "cs_ctx_alloc "); the command return 0(CS_FAIL). The version of sybase that is installed is 12.5. Can anyone help me to find the cause of this problem. Install an error handler (client callback). This should give you the reason for the failure. Michael |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Hello, Try searching your PC for duplicate Sybase dll's like libct.dll, libcs.dll, libcomn.dll, libblk.dll, etc. If your application picks up an old dll it won't be able to initialize the context to CS_VERSION_125. I'm not sure what you do differently to integrate with MFC but if the application can not find the Sybase dll's, that could also cause this type of error. Good luck, Neal |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Hello, I'm still not sure what is different about your program/environment when you compile it as an MFC versus console application. Perhaps it can not find the Sybase dll's. When you run your application, does it create a "sybinit.err"? This file is created by default when the Sybase software can not initialize properly: ================================================== ================= C:\Neal\Firstapp\Debug> firstapp.exe C:\Neal\Firstapp\Debug> type sybinit.err The context allocation routine failed. The following problem caused the failure: Invalid context version. Open Client Message: Message number: LAYER = (5) ORIGIN = (3) SEVERITY = (5) NUMBER = (131) Message String: ct_init(): network packet layer: internal net library error: Fai led to open Net-Library localization file ================================================== ================= In the above example, I changed my PATH to exclude the Sybase directory containing the Sybase dll's. If this doesn't help, perhaps you can zip up a simplified version of your project and send it to Sybase technical support? Thanks, Neal |
![]() |
| Thread Tools | |
| Display Modes | |
| |