My application is an Open Server Application connecting to Sybase 12.5 database.
The version of open server & client libraries are OPENSVR_REL=12.5_32bit_10072 & OPENCLIENT_REL=12.5_32bit_10657.

We are using RW SourcePro 4.0 on Solaris 8.0 with Sun Forte Rel 6.2.

During the application start up it is able to connect to Sybase database.
The statement to get the database connection is as follows:

RWDBManager::setErrorHandler (errorHandler);
cerr << "Before RWDBManager::database" << endl;
const char * database_access_method = "libctl5215d.so";
dBase = RWDBManager::database (database_access_method, direct_server, direct_user, direct_password, direct_db);
cerr << "After RWDBManager::database" << endl;
if (dBase.isValid ())
cerr << "Connected to DB!" << endl; //on output this mesg. is displayed.
cerr << "Set error handler" << endl;

The same connection is then used for further database queries in another file. It is at this time the following error pops up:
[VENDORLIB] Vendor Library Error: ct_connect(): user api layer: internal common library error: There is an internal error in the user api layer.
Error number: 17040941
Severity: 6

The statement where it is giving error is mentioned below.It is the first statement in the application that is trying to hit database after
getting the connection during application start up.

//db is connection at app start up
if (!get_rate_schedule_sp.isValid ())
RWCString spname = "dbo.GetRateSchedule_sp";
get_rate_schedule_sp = db.storedProc (spname);

Please provide your insight about the probable cause of errors.
Please also tell me what are the configuration settings that I should look for it.