Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXECCommands with parameters
Message
From
13/12/2000 11:10:56
 
 
To
13/12/2000 10:50:44
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00452765
Message ID:
00452866
Views:
22
You can do this using ADO objects, as far as I know...

>Yeah, sorry. I know this but I was looking for a way to do this without creating a cursor. I just thought that because it is possible to pass vars into sps by reference it would also be possible to pass them into sql statements...
>
>>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.com
ICQ #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.
Previous
Reply
Map
View

Click here to load this message in the networking platform