Hola Fernando ---
I have had nothing but problems getting SQLServer to return @@identity values. What I have had to institute is a small wait after a new record commit, then requery the new record and see what value was assigned.
>How can I do for retrive a value from a store procedure from a sql 7.0 stored procedure
>
>example
>
>SQL 7.0 Store Procedure****
>
>Create procedure sp_calculo @valor int,
>@fecha datetime,
>@valor_retorno int output as
>begin
>insert transaccion (valores,fechas)
>values(@valor,@fecha)
>
>select @valor_retorno = @@identity
>
>return
>
>end
>
>VFP program for get the @valor_retorno value
>
>a=sqlconnect("coneccion")
>if a>0
>b=sqlprepare(a,"exec sp_calculo 10,[01/01/1999] ","mycursor")
>c=sqlexec(a)
>else
>wait window "Error de Conexion"
>endif
>
>this do not work bacouse i have not the @valor_retorno
>
>what is bad or how can I do for get the return value, please help me
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05