Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Flock equivalent in SQL
Message
 
 
To
28/08/2009 17:15:33
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01420778
Message ID:
01421627
Views:
33
>>Can you be more specific? What seems to be a problem?
>Sorry for the late relpy.
>I was asking how to pass the parameters. I found it.
>Thanks anyway.
>
Samples to SQLExec show that if this was your question.
---------------------------------------------------------------------------------------------------------------
* Execute stored procedure with an INPUT parameter.
SQLEXEC(m.lnConn, 'exec byroyalty ?lnPercent','HalfOffAuthors')

* Create temp stored procedure with OUTPUT parameter and call it.
SQLEXEC(m.lnConn, "CREATE PROCEDURE #MyProc @outparam int OUTPUT AS;
SELECT @outparam=100")
SQLEXEC(m.lnConn, "exec #myProc ?@lnOutput")
? m.lnOutput

* Create a temp stored procedure with INPUT and OUTPUT parameters
* and call it.
SQLEXEC(m.lnConn, "CREATE PROCEDURE #MyProc2 " + ;
"@inputparam INT, " + ;
"@outparam int OUTPUT " + ;
"AS SET @outparam=@inputparam*10")
SQLEXEC(m.lnConn, "exec #myProc2 ?lnPercent, ?@lnOutput")
? m.lnOutput
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform