Subject Re: [IBO] dataSet Modified
Author comesailing@btinternet.com
Yes thanks again Helen...where should we be without you ?

My test did work. The field the program modifies is fields[0]
the primary key..so I did not include that in my test.
Yes I did set the flag false to start with.
OK I like the idea of 'break' when a modified field is found 'cos you
dont need to test any more.

But thanks too for the pointers to the 'after modify' event this
could be the answer.
regards Dave.

--- In IBObjects@y..., Helen Borrie <helebor@d...> wrote:
> At 12:59 PM 07-08-01 +0000, you wrote:
> >Thanks Helen !
> >I have now made a test... but it is rather complicated:
> >
> >eg. For jj := 1 to myquery.fields.columncount do
> > if myquery.fields.column[jj].ismodified then
> > mymodifiedflag := true;
>
> Does this work?
>
> Try
> ..
> MyModifiedFlag := False;
> with myquery do
> begin
> for jj:= 0 to columncount - 1 do // should be zero-based..??
> if fields[i].IsModified then
> if fields[jj].Name <>'TheOneTheAppModified' then // didn't
you mention this?
> begin
> MyModifedFlag := True;
> break;
> end;
> end;
>
>
>
> >But what about an event, to test just after the user makes the
entry?
> >Is there an event which will signal that a change has happened ?
> >myDataset.onModify ?? or something ?
>
> TIB_Row has BeforeModify and AfterModify. IB_Dataset.Fields[] is a
TIB_Row. The events pass the IB_Column as a parameter.
>
> -- helen
>
> All for Open and Open for All
> InterBase Developer Initiative ยท http://www.interbase2000.org
> _______________________________________________________