Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning values from an SQL stored procedure
Message
 
 
To
03/08/2004 09:12:43
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00930255
Message ID:
00930319
Views:
20
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform