Andy,
Your code fails during compilation on the second line with message "Missing operand" (VFP8SP1).
>Hi Gary
>
>In addiotion to the way Sergey showed, you can also do it using a Private Variable in an in-line SQL Passthrough statement like this:
>
>
>PRIVATE puRetVal
>SQLEXEC( nCon, [EXEC sp_name ] + ?@puRetVal )
>
>
>On completion, puRetVal will contain the return value.
--sb--