Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP/ADO/SQL stored procedure syntax
Message
De
06/10/2005 11:18:29
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
VFP/ADO/SQL stored procedure syntax
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01056781
Message ID:
01056781
Vues:
121
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?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform