Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need help
Message
From
03/05/1999 23:43:47
 
 
To
03/05/1999 18:15:38
Fernando España
Alta Tecnologia En Informatica
Guatemala, Guatemala
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Miscellaneous
Thread ID:
00214775
Message ID:
00214832
Views:
16
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
Previous
Reply
Map
View

Click here to load this message in the networking platform