How to pass parameters to a SQL Server stored procedure (247370)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
- Microsoft Visual FoxPro for Windows 7.0
- Microsoft Visual FoxPro 8.0
- Microsoft Visual FoxPro 9.0 Professional Edition
This article was previously published under Q247370 SUMMARY
There are two ways to pass parameters to a stored procedure using SQLExec. One way, which works across all versions of Visual FoxPro, is to build the SQL command as a string variable. The advantage of this method is that you can check the string and see exactly which SQL command you are passing to the back end.
The other way is to pass the Foxpro variables preceded with question marks, as in a parameterized view. In Visual FoxPro version 5.0 and later versions, this allows you to obtain values from the stored procedure that are being returned as output parameters.
REFERENCESFor additional information on calling Stored Procedures, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
156034 How To Retrieve Information from SQL Server on Rows Affected
177056 PRB: Return Parameter Variable Name for SQL Server Causes Error
114787 How To Execute a Stored Procedure on SQL Server
(c) Microsoft Corporation 1999, All Rights Reserved. Contributions by Garrett Fitzgerald, Microsoft Corporation.
Modification Type: | Major | Last Reviewed: | 1/24/2005 |
---|
Keywords: | KbClientServer kbDatabase kbhowto kbSQLProg KB247370 kbAudDeveloper |
---|
|