Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning values from an SQL stored procedure
Message
 
 
À
03/08/2004 09:12:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00930255
Message ID:
00930319
Vues:
21
Derek,

What following line suppouse to do? How 'Login_ID' column is populated?
exec @lnLoginID = Version1.dbo.ApplicationLogin.Login_ID
>In short, it doesn't work.
>
>Here's the complete VFP code:
>
>lcParam1 = 'TestPC'
>lnID = 0
>=SQLExec(lnConnection, "execute ApplicationLoginInsert1 ?lcParam1, ?@lnID")
>
>Here's the complete SQL code:
>
>CREATE Procedure ApplicationLoginInsert1 @lcParam1 char(128), @ID int output
>AS
>insert into ApplicationLogin (Login_PC) values (@lcParam1)
>declare @lnLoginID int
>exec @lnLoginID = Version1.dbo.ApplicationLogin.Login_ID
>SET @ID = @lnLoginID
>GO
>
>The record is inserted into the table correctly, however, no value is returned to VFP. Clearly something isn't right with the SQL code, but I have no idea where the mistake might be. Ideas?
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform