I am trying to write an extended store procedure that returns its data via an output parameter, similar to what one can do with regular stored procedures.
However, I've had no luck with it. Perhaps somebody with a better understand of the Sybase internals can help me out. I have tried tried virtually every combination of arguments... sigh.. it seems it ain't possible (wish ASE
was open source) but I cannot believe that (I am using ASE 12.5.3) help!!! ;-)
Anyway, I get stuck with the first call to srv_descfmt. The server replies: "XP Server Error: 16165/10/0: srv_descfmt(): CS_SET for SRV_RPCDATA not valid"
Here an excerpt of my code:
First I created a procedure called xp_test in ASE:
create procedure xp_test @param INTEGER OUTPUT AS external name "test.so"
I test this with the following SQL code:
declare @output integer
exec xp_test @output OUTPUT