Subject Re: [IBO] EIB_Statement Error Fieldname not found
Author Geoff Worboys
> Query.FieldByName('USEREDIT').AsBoolean := TRUE;
>
> When I try to add a record I receive an exception
> class EIB_StatementError with message Fieldname
> USEREDIT not found. Process stopped. Use step
> or run to continue.
>
> I have tried different variations of this line of
> code but cannot seem to get it right. What is
> wrong with this syntax?

Does Query actually return the UserEdit field? What is the SQL of the
query?

Are you using a dialect 3 database? If so what is the actual DDL for
the table? For example; If the field was declared with the name
"UserEdit" (including the double quotes in the DDL) then your syntax
should be...
Query.FieldByName('"UserEdit"').AsBoolean := TRUE;

Notice the double quotes inside the single quotes - required when a
dialect 3 field was declared using double quotes making the field name
case sensitive.

HTH

Geoff Worboys
Telesis Computing