Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RDO Call to SP returns wrong results

Status
Not open for further replies.

skaza

Programmer
Jan 30, 2001
2
US
Hi,

I have a program which is calling a stored proc in Sybase using RDO (rdoQuery & rdoResultset). The sybase Stored proc accepts one param as input and returns a result set. My problem is the results returned are wrong some times. When I run same stored proc from ISQL the results are consistently correct. I'm expecting this is happeing because ODBC picking up results prematurely (beore sp finished processing). The SP has lots of cursor fetch statements and uses temp (#) tables, so i can't put a Begin Tran/commit in that SP.

Any help is appreciated
 
no, stored proc is returning only one result set.
Structure/logic of the proc is something like this .

-create a temp (#) table
-open/fetch cursors (to get values from other tables used in logic)
-insert values to temp table
-do some more cursor open/fetch commands
-call another proc to fetch some values
-update records in temp table based on above cursor operations
-close/deallocate cursors
-select all records from temp table

So, when I call the SP using RDO/ADO I can see the values as they would be before update part in above logic (only the original values inserted). I tried adding "SET NOCOUNT ON" to the proc, but it has affect.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top