Subject | Re: [IBO] Joined Datasets, Insert not Refreshing Fields (2nd Post) |
---|---|
Author | ehandbury |
Post date | 2002-04-19T03:24:11Z |
--- In IBObjects@y..., "Helen Borrie (TeamIBO)" <helebor@t...> wrote:
SQL below.
select
S.DESCRIPTION,S.STEP,S.DURATION,S.AUTOCOMPLETE,A.ACTIVITYALERTKEY,
A.MASTERITEMKEY,A.ACTIVITYKEY,A.CLIENTKEY,A.USERKEY,A.ATYPE,
A.ADATE,A.ATIME,A.STATUS,A.DUEDATE,A.COMPDATE,A.COMPTIME,
A.COMPUSERKEY,A.NOTES
from MBACTIVITYALERT A LEFT JOIN MBSTEPITEM S ON
S.STEP=A.MASTERITEMKEY where ATYPE=1
ORDER BY ACTIVITYALERTKEY DESC
The problem is that MASTERITEMKEY is set in the OnInsert event, and
therefore the S.DESCRIPTION column (and all S.* columns) don't get
refreshed until the MBACTIVITYALERT dataset is refreshed/posted. I
need the MBSTEPITEM columns to be refreshed while MBACTIVITYALERT is
still in dssInsert. I am using TIB_Query. Thanks.
Eric.
> At 09:40 PM 18-04-02 +0000, you wrote:insert
> >Hello,
> >
> > Sorry for the 2nd post, but I really need this answered.
> >
> >(IBO4.2Gc, BCB4, FB-1.0-796)
> >
> >I have a joined dataset:
> >select D.DESCRIPTION,M.MASTERKEY from MBMASTER M left join MBDETAIL
> >D on D.DETAILKEY=M.MASTERKEY
> >
> >I have the KEYRELATION property set so the dataset is live. I also
> >have BufferSynchFlags set to AfterInsert.
> >
> >I set the MASTERKEY field value in the OnAfterInsert event, and the
> >problem is that the row does not get refreshed until I do a
> >Refresh/Post. Is there any way to refresh the dataset after an
> >while still remaining in dssInsert mode? I must use a Join sincethe
> >rows are displayed in a grid.a
>
> Something looks funny here. From a client perspective, this isn't
> master-detail setup since there is no detail dataset.the sense
>
> If you set KEYRELATION, that makes your joined dataset "live" in
> that any changes to columns in that table will be posted. Changesin
> columns derived from other tables won't propagated to theunderlying
> tables, since the client app has no knowledge of their relationship.use the
>
> If you want to implement a master-detail relationship, by all means
> joined dataset as the master, but provide eitherthe
> - a detail dataset extracted from the detail table and implement
> mastersource and masterlinks; or
> - stored procedures that are called in the XXXXSQL properties of
> dataset to perform the changes in both underlying tables (and don'tdefine
> KEYRELATION).pertinent for
>
> Apologies if I have misunderstood your setup....also, it's
> you to mention which data access components you are using.Sorry for being confusing. This is not a master-detail. Here's the
SQL below.
select
S.DESCRIPTION,S.STEP,S.DURATION,S.AUTOCOMPLETE,A.ACTIVITYALERTKEY,
A.MASTERITEMKEY,A.ACTIVITYKEY,A.CLIENTKEY,A.USERKEY,A.ATYPE,
A.ADATE,A.ATIME,A.STATUS,A.DUEDATE,A.COMPDATE,A.COMPTIME,
A.COMPUSERKEY,A.NOTES
from MBACTIVITYALERT A LEFT JOIN MBSTEPITEM S ON
S.STEP=A.MASTERITEMKEY where ATYPE=1
ORDER BY ACTIVITYALERTKEY DESC
The problem is that MASTERITEMKEY is set in the OnInsert event, and
therefore the S.DESCRIPTION column (and all S.* columns) don't get
refreshed until the MBACTIVITYALERT dataset is refreshed/posted. I
need the MBSTEPITEM columns to be refreshed while MBACTIVITYALERT is
still in dssInsert. I am using TIB_Query. Thanks.
Eric.