Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to do view like this in SQL 7
Message
 
À
03/08/1999 10:04:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00249203
Message ID:
00249259
Vues:
17
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
Fil
Voir

Click here to load this message in the networking platform