Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP/ADO/SQL stored procedure syntax
Message
From
06/10/2005 11:18:29
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
VFP/ADO/SQL stored procedure syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01056781
Message ID:
01056781
Views:
119
Assuming we have the following SQL stored procedure:
CREATE PROCEDURE usp_test 
	@Number	INT,
	@NewNumber INT OUTPUT
AS
SET @NewNumber = @Number + 3
RETURN @NewNumber
GO
In VFP we have valid ADODB.Connection object oConn and some variables. I want to use connection's Execute method:
LOCAL lnIn AS Integer, lnOut AS Integer, lnReturn AS Integer
lnIn=15
oConn.Execute("What?")
What would be the correct syntax for:
a) getting procedure's return value?
b) getting procedure's output parameter?

Microsoft claims that it is possible to execute a stored procedure as a native method of a Connection object. Something like this:
lnReturn = oConn.usp_test(lnIn, @lnOut)
I has not been able to get it working. Has anyone?
Next
Reply
Map
View

Click here to load this message in the networking platform