I got a procedure in MS Sql 7.0 which returns 1 or 2 depending on the execution of the statements in the proc. It takes a parameter also. How can my application recieve this return value. This is how I called the proc.

dim dup as integer
sqlstr = "{dup=CALL dupcode (" & Trim(txt_scancode.Text) & ")} "
cn.Execute sqlstr

This gives error. If I remove the 'dup=', then it works fine, but I dont get the return value.

Please help

Thanks
James