Subject | Re: [IBO] please help IsModified cause Access Violation |
---|---|
Author | Lucas Franzen |
Post date | 2007-01-10T17:54:30Z |
Iwan,
send2iwan schrieb:
DataChange event.
This event also occurs when changing the current record (for example in
a TIB_Grid).
In this case the field param is NIL.
Change your code to:
procedure TForm1.IB_DataSource1DataChange(Sender: TIB_StatementLink;
Statement: TIB_Statement; Field: TIB_Column);
begin
if Assigend ( Field ) then
begin
if Field.FieldName = 'SAMPLE' and Field.IsModified then
begin
// modified another fields
end;
end;
end;
then it should work.
Luc.
send2iwan schrieb:
> i am trying thisAs Roger said, always check if the field is assigned when using the
>
> procedure TForm1.IB_DataSource1DataChange(Sender: TIB_StatementLink;
> Statement: TIB_Statement; Field: TIB_Column);
> begin
> if Field.FieldName = 'SAMPLE' and Field.IsModified then
> begin
> // modified another fields
> end;
> end;
DataChange event.
This event also occurs when changing the current record (for example in
a TIB_Grid).
In this case the field param is NIL.
Change your code to:
procedure TForm1.IB_DataSource1DataChange(Sender: TIB_StatementLink;
Statement: TIB_Statement; Field: TIB_Column);
begin
if Assigend ( Field ) then
begin
if Field.FieldName = 'SAMPLE' and Field.IsModified then
begin
// modified another fields
end;
end;
end;
then it should work.
Luc.