Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The best way of displaying surrogate foreign keys
Message
From
13/01/1999 11:13:44
 
 
To
13/01/1999 11:10:46
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00175383
Message ID:
00175479
Views:
20
Hi, John! It's good idea, but why not to use cursor for the same purpose? Firstly, it does not take extra buffers (not necessary for combo), does not overload dbc container, and might be faster if there are really many records in child table.

>Ian --- How are you pulling this data over? I would think a view like:
>
>CREATE SQL VIEW vueChildren AS ;
>SELECT child.key,child.description FROM parent,child WHERE
>child.key = ?parent.childfk
>
>Attached to a Combo as RowSource, this would work fine unless there was an ungodly number of child records per parent.
>
>>
>>I'm hoping someone can point me in the right direction for displaying and validating foreign data that is based on a surrogate key.
>>
>>All of the tables in the system that I'm working on have hidden primary keys. All foreign keys obviously point to the surrogate primary key of the foreign file.
>>
>>I need to know how best to display a field from the foreign file, based on the surrogate value. At the moment we are using combo boxes, but these can be slow, especially if there is a lot of data. Also, there are occasions where the foreign key needs to be a subset of the possible values, making for a potentially complex SQL statement.
>>
>>Has anyone got a strategy for using text boxes to do this? The solution needs to work in grids as well.
>>
>>PS Using VFP 5.0a
>>
>>Thanks for your time,
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform