Hi!
You don't need it. With SQL Server following works very well:
SQLEXEC( lnHandle, "SELECT COUNT(1) as MyCount FROM Customer", "MyCursor")
*returns cursor MyCursor with 1 column MyCount and 1 row in it that contains count
SQLEXEC( lnHandle, "SELECT MyVar", "MyCursor")
* same as above - get some variable value
Just get value from cursor and close it - you're there.
>Hi,
>
>Is it possible to pass a var by reference in an sqlcommand to get the results of a sqlcommand?
>
>That is, I know its possible to do the following from fox:
>
>SQLEXEC( lnHandle, "SELECT * FROM Customer WHERE Id = ?lnId", "Results") where lnId is a fox var, but is it also possible to do something like the following...
>
>SQLEXEC( lnHandle, "SELECT ?lnCount = COUNT(1) FROM Customer")
>where UDFPARMS are set to reference
>
>Can anyone let me know the correct syntax?
>
>Thanks
>
>Mace
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.