Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using views to populate list box with multiple records
Message
From
29/01/1999 14:25:36
 
 
To
29/01/1999 14:17:04
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00181943
Message ID:
00181945
Views:
8
Hiya ---

First off, it sounds like you need a parameterized view instead of a filter. Try creating a view that includes "WHERE zoneview.wcnumber = ?wcdet.wcnumber" and then all you have to do when wcdet.number changes is REQUERY() the view. BTW, you may want to set the NoDataOnLoad DE Cursor property for the view to .F. to avoid an error on opening.

As to mover lists, look at the Solutions sample that ships with VFP....also lots of mover lists classes and examples here in the Files section of the UT.



>HI everyone!
>Let me thank everyone for helping me out.
>I have another question here, this time about using views. Can anyone tell me if it is better to create local views and then populate list boxes with multiple records by putting a filter on the parent record.
>Here is the code which I am using in refresh procedure of the listbox:
>
>cparentTable = Alias()
>* selects the view
>SELECT zoneview
>* sets filter on wcdet.wcnumber<-- which is a field from parent table
>SET FILTER TO ALLTRIM(wcdet.wcnumber) = ALLTRIM(zoneview.wcnumber)
>
>* Populating list box with relevent field values
>Rowsource = 'zoneview.zone'
>Rowsourcetype = 6
>
>SELECT (cparentTable)
>
>OR, what if I put SQL SELECT Statements in the refresh() for each list box and try to retrieve this data.
>
>Also, how should I manipulate the data in a view by using a mover lists.
>
>Please advise me as what do I need to do from here on.
>THANKS!
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform