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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement