Subject Re: [IBO] Unsure of editablitly in join select
Author Helen Borrie
At 01:52 AM 30-09-02 +0000, you wrote:
>Hi there,
>I have a table which has three fields; PART_ID, USER_ID & QTY
>This table is used to maintain the qty of certain parts in different
>users locations.
>Now, I would like to be able to edit this table directly, by
>allowing the change of the QTY and PART_ID fields. As PART_ID is a
>FK to the parts table, I obviously want the end user to see the
>actual PART_NUMBER (not th ID), so I'm using a join to display the
>data accordingly.
>My joined select statement is not updateable, so I'm having to find
>another way around this.

Assuming the select statement for your grid looks something like this:

from PartsQuantity pq
join Parts p
on pq.PART_ID = p.PART_ID

then you can set the dataset's RequestLive property true and enter
PartsQuantity into the KeyRelation property in order to make the fields
from the PartsQuantity table updateable.

>Is using a IB_LookupCombo in the grid to display the part numbers a
>bad way to do this?
>At the moment, the part table has around 2000 records,

It's OK for 2000 records - but there is a better way, if you are using the
native IBO data access - please confirm.

>but this will eventually be around 10,000 records.

Not OK for 10,000 records. That also suggests that your PartsQty table
will be huge also and will require some serious restriction by some WHERE

>I am just wondering if this is a poor design because of the size of
>the part table,

It's a poor design if you have no way to limit the selection of parts, e.g.
a part type or some other sort of grouping device so that you can apply a
WHERE criterion to get a smaller subset of Parts records.

There is a lot more to be said about the techniques involved in this sort
of application task, including alternative ways to make joined datasets
updatable. More information about data structures and components in use
would help.