Subject Re: [IBO] Trouble with inserting row in TIBOTable when used as a detail dataset
Author Daniel Rail
At 29/10/2002 09:16 PM, you wrote:
>Hello,
>I have just completed the basic migration of some bigger project to
>IBObjects.
>Now I am running into some serious compatibility trouble concerning
>such a basic master-detail-functionality of TIBOTable that I fear I
>am simply missing some important point.
>
>Just look at this trivial standard-constellation:
>1. Table dtMaster with primary key "INTROWID"
>2. Table dtDetail with primary key "INTROWID" and foreign
>key "MASTER" referencing dtMaster.INTROWID
>(MasterSource = dsMaster;
>MasterFields=INTROWID;IndexFieldNames=MASTER)
>
>Now in BDE-world, inserting a row in dtDetail would automatically
>assign the value of dtMaster.INTROWID to the field dtDetail.MASTER.
>But with TIBOTable, the value of dtMaster.INTROWID is assigned
>to the field dtDetail.INTROWID instead - dtDetail.MASTER is left
>unassigned .
>
>
>
>Before migrating to IBObjects I had tested master-detail-
>functionality of TIBOTable by simply scrolling the (master and/or
>detail) datasets, which btw. worked ok.
>Needless to say that I am a little bit unhappy now to discover that
>any master-detail-combinations in my migrated application fail to
>insert new rows....
>
>Do I have overlooked some big magic switch somewhere ?

Try entering in the MasterFields property of dtDetails the relation as
outlined below:
DetailTableName.MASTER=MasterTableName.INTROWID

I know that's what I had to do when I still had master-detail relationship
with TIBOTables in my application, since then I've replaced them using
TIBOQuery.


Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)