Subject | Re: [IBO] TIB_DataSource.onDataChange |
---|---|
Author | Paul Vinkenoog |
Post date | 2003-12-28T15:55:32Z |
Hello Ulrich,
create table ThisTable
(
"myField" char( 8 ), // or whatever type
...
)
or case-insensitively:
create table ThisTable
(
myField char( 8 ), // or whatever type
...
)
In the latter case, the field name is stored in the database in
all-caps, so you have to test if Field.FieldName = 'MYFIELD'.
If you're not sure, test if UpperCase( Field.FieldName ) = 'MYFIELD'.
Or: if AnsiCompareText( Field.FieldName, 'myField' ) = 0.
"... else ShowMessage( 'Field is nil' )" and see what happens.
Greetings,
Paul Vinkenoog
> Now I don't have any access violations any longer, but my code isDid you define myField case-sensitively like this:
> still not working :-(
>
> with :
>
> procedure IB_DataSourceDataChange(Sender: TIB_StatementLink;
> Statement: TIB_Statement; Field: TIB_Column);
> begin
> if (Field<>NIL and Field.FieldName='myField') then...
>
> end;
>
> these condition seems to be NEVER true !!??
create table ThisTable
(
"myField" char( 8 ), // or whatever type
...
)
or case-insensitively:
create table ThisTable
(
myField char( 8 ), // or whatever type
...
)
In the latter case, the field name is stored in the database in
all-caps, so you have to test if Field.FieldName = 'MYFIELD'.
If you're not sure, test if UpperCase( Field.FieldName ) = 'MYFIELD'.
Or: if AnsiCompareText( Field.FieldName, 'myField' ) = 0.
> More than this. If I try to look which Fields are passing throughAre you sure the handler is still called at all? Maybe you could add
> with:
>
> if Field<>NIL then showMessage(Field.FieldName);
>
> nothing happens. Strange.
"... else ShowMessage( 'Field is nil' )" and see what happens.
Greetings,
Paul Vinkenoog