I am using Embedded SQL (OCS) with sybase 12.5 on windows platform. My application calls the functions of dll which connects and fetches the data. We used to open the connection once and later use the same connection for further interaction with the Database.
Every time caller function gives the new query.
I am able to fetch the data for first time and later it fails over PREPARE Statment (EXEC SQL PREPARE Stmt0 FROM :sql_cmd;). Below is the error which is coming up:
SQLCODE = -33620275
---> cs_objects: cslib user api layer: external error: ZZZZZ cs_objects: error performing requested operation.
The following is the piece of code of that function:
EXEC SQL ALLOCATE DESCRIPTOR output_desc0 WITH MAX 256;
EXEC SQL PREPARE Stmt0 FROM :sql_cmd;
EXEC SQL DECLARE Cursor0 CURSOR FOR Stmt0;
EXEC SQL OPEN Cursor0 USING SQL DESCRIPTOR output_desc0;
EXEC SQL DESCRIBE OUTPUT Stmt0 USING SQL DESCRIPTOR output_desc0;
EXEC SQL GET DESCRIPTOR output_desc0 :output_count = count;
EXEC SQL FETCH Cursor0 INTO SQL DESCRIPTOR output_desc0;
EXEC SQL GET DESCRIPTOR output_desc0 VALUE :index
:sr_data = DATA;
EXEC SQL CLOSE Cursor0;
EXEC SQL DEALLOCATE DESCRIPTOR output_desc0;
EXEC SQL DEALLOCATE PREPARE Stmt0;
Kindly Help me to take out from this problem?
Thanks in Advance,