Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtering a local view.
Message
From
28/09/2000 09:46:39
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00420901
Message ID:
00421999
Views:
15
Larry,

Also you might want to mention that if you can set the NoDataOnLoad = .T. when you don't have a value for the parameter when the form loads...

Thanks

>>Thanks Larry:
>>
>>Are you referring to as a parameterized view created using SQLPREPARE() and SQLEXEC()?
>>
>>If yes, I can not seem to get a positive connection handle at the initial SQLCONNECT(). My database name is AMS.dbc and my table is Customer_Ship_To.dbf. I don't have any passwords or anything set up.
>>
>>If no, can I set up parameters in the Query Designer?
>>
>>Thanks again
>
>SQLPREPARE() and SQLEXEC() are used to setup queries on remote data. In other words, data accessed not via the VFP database engine but through (in VFP 6's case) ODBC. It is not meant for use with local views and queries.
>
>You can do this in the View Designer. On the Filter tab of the Designer, you can specify the criteria the view will use to retrieve data. To make the view parameterized, precede the value in the Example column with a ?. This will designate that the example is a variable and should be evaluated when the view is opened or requeried.
>Ex.
>Field Name         Not Criteria       Example
>MyTable.MyField            =          ?cVariable
>Before you open the view or requery the view, declare the variable, set it to the appropriate value and then access the view.
>
>Ex.
>cVariable = 'Somevaluehere'
>use mydbc.myview
>
>and later if you want different values returned in the view
>
>cVariable = "SomeOtherValue"
>select myview
>=requery("myview")
>
>HTH.
Previous
Reply
Map
View

Click here to load this message in the networking platform