I have written a C++ program on NT using Sybase's OpenClient CT library.
This program is written as a NT service which writes some data in the
Sybase SQL Server running on a HP Box. I am using ct_connect to connect
to Sybase. I am having a wierd problem with this call. Once in blue moon
this call fails with a message

Clinet Message Number: LAYER = 1, ORIGIN = 2
SEVERITY =2, NUMBER = 63 Message String: ct_connect(): user api layer:
internal client Library error: Read from the server has timed out.

When a ct_connect fails I have Client Call Back Message function, inside
which I print the above message. So when this failure occurs, the code
executes the client call back message function and then the entire
program crashes. This means my service crashes.
After this call back message function, the code should suppose to go and
try once more to ct_connect. But it is not going there.

To prove there is nothing wrong on the client call back message
function, I have just gave an incorrect server name. The client call
back function prints the error message and then goes to the call stack
where they left and executes the remaining code.

Since this error is very hard to reproduce, I could not give any more
details. Do any of you faced this problem before.

Any pointers appreciated. Please respond to


P.S If this is not the right place to post this question, could you some
one tell me which is the right place.