In the example you gave, you will get the required version number back in a cursor, which will have one row and one column. The name of the cursor will default to SQLResults, but you can optionally pass another name as the third parameter to SQLEXEC().
If the command that you are sending to the server is a stored procedure, you can retrieve its results in the form of output parameters, which are parameters that are passed by reference from VFP. If you are unfamiliar with output parameters, you should read up on how SQL Server handles parameters in stored procedures.
If the command you are sending includes a PRINT statement, you are out of luck, as these cannot return data to VFP. Similarly, if it has a RETURN statement, you will not be able to retrieve the returned value in VFP.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.