stored procedures: return codes and return status with rdo

stored procedures: return codes and return status with rdo

Post by Trista » Thu, 16 Sep 1999 04:00:00



Could anyone please shed some light on how to retrieve return codes from
stored procedures called with rdo in VB?.
I see in msdn that you are recommended not to use the execute method of
the connection object - because you can't get at the error codes - and
that you should use the openresultset method of the rdoquery object. I
can do this and run my stored procedure but still can't find a way of
getting the return codes I need.
TIA for any enlightment,

Tristan

 
 
 

1. Executing Sybase stored procedure returning both resultset and return code

I have a sybase stored procedure that returns the result set from a
query and a return code like 0 or some other number to indicate
success, failure or an empty result set. Can I get the reuslt set and
the return code in one call to the stored procedure by doing the
following:

String call_qirdtiers = "{ ? = call Q_Tier(?) }";
cs1 = con.prepareCall(call_qirdtiers);
cs1.execute();
//Get return code
String res = cs1.getString(1);
ResultSet rs1= cs1.getResultSet();

I tired doing the above but I did not succeed. I had to execute the
stored procedure twice using jconnect 4.2. Once to get the return code
whether the call is successful or not and a second time to get the
result set by using the method cs.executeQuery(). Is there an
alternative/work around to do this?

Any help/views would be greatly appreciated.

Thanks

Sent via Deja.com
http://www.deja.com/

2. Technical Topics

3. Can't update result set returned from stored procedure using RDO

4. Javascript form data -> htm file

5. getting rid of the return status of a stored procedure

6. Thank you Karl Schendel

7. SP1 RDO ODBC Stored Procedures With Parameters Not Returning Correct Resultset

8. A GTE Technical Report by F. Manola

9. how to set the return status for an extended stored procedure

10. Can't update result set returned from stored procedure using RDO

11. Stored Procedure, Return status, VBSQL

12. Returning string from stored procedures with RDO

13. Using RDO to get the message return by print statement in stored procedure