Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Paththrough syntax
Message
From
04/10/2002 12:56:56
 
 
To
03/10/2002 19:53:57
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00707619
Message ID:
00707817
Views:
28
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
Previous
Reply
Map
View

Click here to load this message in the networking platform