Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning values from an SQL stored procedure
Message
De
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:
00930311
Vues:
15
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?

Regards

Derek
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform