>>>>>did they replace goto with try/catch in t-sql or you are talking about writing sprocs in vb/c#?
>>>>
>>>>try endtry catch
>>>>
>>>>>im doing most of the work in oracle/pl-sql and i like this language much better than t-sql.
>>>>
>>>>sql2005's t-sql reduce the gap, but p-sql is some years ahead.
>>>
>>>How do you return Return code into VFP from SP?
>>>
>>>Thanks.
>>
>>
>>DECLARE @return INT
>>
>>EXEC @return=[db].[user].[procedure]
>>
>>SELECT @return
>>
>
>No, I meant in VFP code how can you get return. Anyway, I found an answer in Sergey Berezniker's reply, but I lost the thread again...
put this code into a SQLEXEC()
TEXT TO sqlCmd
DECLARE @return INT
EXEC @return = [db].[user].[sp]
SELECT @return "code"
ENDTEXT
sqlexec(h,m.sqlCmd,"return")
? return.code
If the sp retunr some recordset,
set batch = .F. and execute the download recordset-by-recorset.