Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Like in view designer not finding records
Message
From
29/06/1999 19:31:39
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00235564
Message ID:
00235610
Views:
17
>What about if the value you are looking for is parametrized. Such as ?states.
>
>
>if I do the following
>
>with thisform
>*value of txtstates = O
>?states = %+.txtstates
>requery(states)
>endwith
>
>I get an error a syntax error. On a parameterized view is a there a way to pass the % sign. Thanks for reply
>

First, the % is a part of a string, so you'd have to encapsulate it in quotes.

Second, when constructing the view parameter, you don't include the ? in the assignment statement. So your assignment statement from the example above would be:

states = '%' + .txtstates

You could then use:

...LIKE ?states...

in your SQL Select statement (you migth need to define the parameterized view programmatically rather than with the View Designer to build the expression properly; I haven't used the View Designer in a while, at least not since I started using VFP6.)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform