Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing Arbitrary Conditions to Parameterised Views
Message
 
 
To
21/03/2004 07:53:34
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00888275
Message ID:
00888301
Views:
13
Harry,

You can create them on the fly by using a CREATE SQL VIEW command. You probably want to use a TEMP.DBC to avoid the DBC bloat that is involved when a view is changed.

>Whats the trick for creating a parameterised view with arbitrary filter conditions (held - eg - in a string variable called "qrycode") ?
>
>I've tried
>
>SELECT Contacts.*;
> FROM ;
> CONTACT!CONTACTS;
> WHERE (?qrycode)
>
>which crashes either with "function name missing" or "invalid sql clause"
>
>and
>
>WHERE EVALUATE(?qrycode)
>
>which doesn't crash, but never finds any records, even when I set "qrycode" for known matches.
>
>The idea is to allow users to create their own queries as parameterised views on whatever fields and conditions suit them at the time.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform