Subject | Re: [firebird-support] SQL - Delphi question - INNER JOIN |
---|---|
Author | Helen Borrie |
Post date | 2004-03-03T03:02:44Z |
At 10:21 PM 2/03/2004 -0300, you wrote:
find) to make them updatable. IB Objects does and I expect that FIBPlus
does - these two component sets are a lot more sophisticated.
If you want to make joined sets updatable in IBX I think you have to make
them into views, and write update, insert and delete triggers for the
views.; or write stored procedures that you can call when the user wants
to do any data changes.
This list is not a Delphi list, by the way.
Anyhow, in Delphi, it is better to maintain master-detail sets via separate
datasets - one for Master, one for detail. Delphi has more than one way to
enforce the relationship for display and editing purposes. At
www.firebase.com.br you will find technical articles on this topic, in
Portuguese.
/heLen
> Hello,Joined datasets are not updatable. IBX doesn't support any way (that I can
>
> I think that using a INNER JOIN is the cleanest way to do a relation
>beteween two tables.
> I'm using a IBDataset component to supply a DBGrid but it's not
>updating the related (JOINED) column after a insert.
> I don't think that relating the columns into the dataset component
>(creating a virtual field) is a clean way but now it is the only way
>that it is working.
>
> This is the SQL statement example:
> "SELECT ENTRITEM.*, PROD.DSCR AS PRODDSCR FROM ENTRITEM INNER JOIN
>PROD ON (PROD.PROD = ENTRITEM.PROD)"
>
> Thank you all for the help!
find) to make them updatable. IB Objects does and I expect that FIBPlus
does - these two component sets are a lot more sophisticated.
If you want to make joined sets updatable in IBX I think you have to make
them into views, and write update, insert and delete triggers for the
views.; or write stored procedures that you can call when the user wants
to do any data changes.
This list is not a Delphi list, by the way.
Anyhow, in Delphi, it is better to maintain master-detail sets via separate
datasets - one for Master, one for detail. Delphi has more than one way to
enforce the relationship for display and editing purposes. At
www.firebase.com.br you will find technical articles on this topic, in
Portuguese.
/heLen