Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to do view like this in SQL 7
Message
 
To
03/08/1999 10:04:29
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00249203
Message ID:
00249259
Views:
14
Parameterized Queries (ie where ?var) are handled by the VFP ODBC converter,
and are invisible to SQL server. It translates even SQLEXEC calls.

For example: This works just fine with SQL Server 6.5/7.0

ox = sqlconnect('localserver')
=sqlexec(ox,'USE MYDATABASE')
cParameter = 'SMITH'
=sqlexec(ox,'SELECT * FROM CONTACTS WHERE LNAME = ?cParameter')

VFP catches the ? and substitutes the parameter for you.

>Hi gang,
>
>In VFP - I have lot's of local views along the line of:
>
> "Select foo from mtable where &cWhere".
>
>This allows me to construct highly variable where clauses on the fly and gives the user the ability to construct searches from lots of different criteria. It works GREAT in VFP and I don't wanna lose it as I migrate to SQL7.
>
>Now - obviously SQL 7 doesn't get the macro-expansion, so the question is: How do I accomplish this same thing with Remote Views or combination of remote and back-end views?
>
>thanks,
>Ken
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform