Thanks Vlad !
I knew this solution, but I imagined there was a solution where the returned parameters didn't had to be passed through a cursor ... but this seems to be the only way.
>Hi!
>
>>>Return the ID value from there as you need, you can use also RETURN that is better for use in the SP.
>>
>>My quesion to this remark is, can read this parameter in Visual foxpro, and if yes, how ?
>
>When last statement is SELECT ... as nID:
>
>=SQLEXEC(nConnectHandle,"EXEC MyNewID 'MyTableName'",'IdResult')
>? IdResult.nID
>
>HTH.