Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Whattagrid!!!
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01159650
Message ID:
01159654
Views:
27
>>Hello Gurus!!
>>
>>Today's question...................
>>
>>I have a form with a GRID on it. This grid is displaying data from 3 tables (Rx, Drug and Doctor) that are linked together this way.....
>>
>>Rx -> Drug through Rx.drug_id = Drug.drug_id
>>
>>and
>>
>>Rx -> Doctor through Rx.doctor_id = Doctor.doctor_id
>>
>>simple enough, yes?
>>
>>We have a button on the screen for CHANGE GRID ORDER. If pressed, the order of the grid changes.... based on the index chosen when you click the button.
>>
>>Presently there are only 2 indexes to switch among....
>>1) Date order
>>2) Descendig Rx number order.
>>
>>These indices are based on fields that are exclusively in the Rx table, which is the SELECTED table of the grid (the other 2 are linked and some fields displayed).
>>
>>NOW... we would like to be able to add a 3rd choice to the ordering displayed (and add a 3rd index to choose from). Here is the rub.....
>>
>>The 3rd index is on DRUG name... which is in the linked table DRUG. I can't create an index based on 2 tables to get at the Drug name..... so what options are available?
>>
>>Remove the 3 tables from the grid, and replace with a CURSOR of the 3 tables, so as to get at the field DRUG_NAME in DRUG? Or what?
>>
>>Thanks in advance!!!
>>Tommy
>
>If the grid is only for showing data I would build a parameterized CursorAdapter or View and bind the grid to it. Then I could Index it as I want.

Thanks. I was hoping to avoid this, but this may be the only way to get it done. I appreciate the help!

Tommy
Tommy Tillman A+ NetWork+ MCP
Previous
Reply
Map
View

Click here to load this message in the networking platform