How to get the return value of the stored procedure in MSSQL

zhaozj2021-02-17  66

Disclaimer stored procedure create prop_results_demo @inparmint int

SELECT @ outparmint = 69

Return 16nd is used to return each return value as follows: Long Lreturn, LResult4, Lresult3, Lresult4, Lresult5, LResult4, LResult5, LResult6, LRESULT5, LRESULT6

DECLARE RESULTS_DEMO Procedure for @ returnvalue = sp_results_demo @inparmint =: lpram1, @outparmint =: lpram2 output using sqlca;

Execute results_demo;

Do while sqlca.sqlcode = 0Fetch Results_Demo Into: LRESULT1,: LRESULT2,: LRESULT3,: LRESULT4; LOOP

Fetch Results_Demo Into: LRESULT5,: LRESULT6;

Do while sqlca.sqlcode = 0Fetch Results_demo Into: LRESULT5,: LRESULT6; LOOP

Fetch Results_Demo Into: Lreturn,: LPRAM2;

Close Results_Demo;

Lovers wdw@gst.com.cn

Mail to: IMDT@263.net

转载请注明原文地址:https://www.9cbs.com/read-31348.html

New Post(0)