SQL stored procedures: Many netizens should encounter the return value of the return value result set in use, and browse a lot of posts online, basically think that it is not possible to return at the same time, too That is, it can only be returned one. However, if you encounter some stored procedures to be verified, it is inevitable that there will be needed: 1. After verifying, correct, return the correct value, get the result set. 2, error, return error value, steering, acquire error message.
At present, my handling method is to call a stored procedure: (I don't have much to say in front, I believe how the netizens who encountered this problem already know how the ASP calls the stored procedure)
Returns the result set when the stored procedure is correct, and the error value is returned when the error is wrong.
SET RS = CM.EXECUTE
if xi = adstateclosed the meaning (error no result set, get error) Conn.close
SET RS = Nothing
Set conn = Nothing
CM.Parameters ("Return_Value"). Value
Else
Get results set)
Correct, executing normal code
Get it, if it is not clear, hey, then send it to cmself@sina.com