Hi Sergey
>It's not a question of variable visibility but how you specify VFP variable in the SQLEXEC(). I would try
>
>liID = 12345
>lnSPRetVal1 = 0
>lnRetVal = SQLEXEC(lnCon, "EXECUTE PROCEDURE DelUStock(?liID) RETURN_VALUES :?@lnSPRetVal1 ;")
>
I tried your code suggestion but I get the following error:
---------------------------
ExAcct - A Micro-ERP
---------------------------
The following error(s) has been raised when trying to connect to the database #1/1
Error #: 335544569
Function: SQLExecDirect
Message: Dynamic SQL Error
SQL error code = -104
Token unknown
RETURNING_VALUES
---------------------------
OK
---------------------------
First it had complained about the ?, so I removed the ? and now this. In fact I tried, only @, only ?, ?@ and @? but no luck. Currently I have removed the RETURNING_VALUE code segment and it works. Any suggestions welcome.