>>This might work on a sql-server back-end but not if you use VFP that way.
>>
>>This is what I tried:
>> param1 = 10
>> lnResult = sqlexec(lnconnection, 'Exec getkey param1')
>> IF lnResult < 0
>> =AERROR(laerror)
>> =aerrmsg(@laerror)
>> ENDIF
>> RETURN lnResult
>>
>>I get a command not recognized command.
>
>You forgot the question mark before param1.
>lnResult = sqlexec(lnconnection, 'Exec getkey ?param1')
Hi Nabil,
This is the pitfall that I also trapped into. He's not sqlconnecting to SQL server but VFP via ODBC. Secondly param1 without ? would be true if it's just an input parameter.
sqlconnect(handle,"{call procedure (input1, input2, ?@output1) }")
Cetin