Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Paththrough syntax
Message
De
04/10/2002 12:56:56
 
 
À
03/10/2002 19:53:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00707619
Message ID:
00707817
Vues:
29
I've never tried parameterized views in the fashion you mentioned. Here are a couple of variations:

You hard coded myTable = 'clients' and myWhere = 'client_id=' + myClient
-if this is the case then just use it in the SPT statement:

HTH
John
myResult = SQLExec(myCinn,"Select * from clients where client_id = ?myClient","myCursor")
If myTable and myWhere were not hard coded to some value I would do something like this:
lcCriteria = myTable + " Where client_id = '" + myClient + "'"  &&Using single quotes for char values.

myResult = SQLExec(myCinn,"Select * From " + lcCriteria,"myCursor")
>Hi
>I'm trying to use parametrized "where" cluse
>myTable = 'clients'
>myWhere = 'client_id=' + myClient
>myResult = sqlExec(myCinn,'select * from ?myTable where ?myWhere','myCursor')
>
>if I take off the where clause everything works fine
>with the where clause it doesn't work
>
>what is the right syntax to make it work
>
>thanks in advance,
>Nir
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform