See
Re: Can stored procedures return values? Message #
876903.
In case of SQLEXEC() reporting an error you should use AERROR() function to get detailed info about it.
You get the error because positional parameters cannot be used after named have been used.
lcInParam = "123"
lcOuParam = ""
= Sqlexec(sqlcon, "EXEC StoredProcedurename @InParam = ?lcInParam, @OuParam=?@lcOuParam")
>
>Can somebody help me with an syntax example of how to read a return value from a SQL Server stored procedure in VFP, using SQLExec?
>
>IS something like:
>
>= Sqlexec(sqlcon, "EXEC StoredProcedurename @InParam = 123", @OuParam)
>wait window OutParam
>
>With the above code, sqlexec always returns -1.
>
--sb--