Hi Marcia,
See my response to Andy.
>Hi Sergey.
>
>
First, it pops up View parameter dialog.>
>This is because you did not initialize the parameter puRetVal. Because puRetVal is Private in scope, declaring it does not initialize it.
>
>
If I enter anything, ODBC error is generated "[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure proc_test has no parameters and arguments were supplied".>
>I am no SQL Server guru, but this error is telling me that you did not declare the output parameter in your stored procedure. Try using this as your stored procedure:
>
>
>CREATE PROCEDURE proc_test @puRetVal integer output
>AS
>set @puRetVal = 10
>
>GO
>
>
>Now in VFP, try calling it using this code. Of course, if you have changed the login from its default user id of sa and no password, substitute accordingly < g >.
>
>
>PRIVATE puRetVal
>puRetVal = 0
>nCon = SQLCONNECT( 'master', 'sa', '')
>SQLEXEC( nCon, [EXEC proc_test ?@puRetVal] )
>?puRetVal
>
--sb--