Subject Re: [IBO] Unable to access database fields in my source code
Author Daniel Rail
Comments below.

At 29/01/2002 09:22 AM, you wrote:
>I am new to IBObjects so I bought the Getting Started
>help and it has been very informative but there are
>three questions that I am unable to find an answer
>1) The data aware fields link to the database fields
>OK but I am unable to access any database fields in
>the code. eg:
> ADM.qAccount.FieldByName('Desc').AsString := 'Test';
> ADM.qAccount['Desc'] := 'Test';
>Both respond with the runtime error
>"Test.exe raised exception class EIB_Statement error
>with message Fieldname: Desc not found process
>What am I doing wrong?

First of all, I would suggest that you try to change the field name, if you
can. 'DESC' is a reserved word in IB/FB and pretty much any RDMS system
out there.
But, try ADM.qAccount.FieldByName('"Desc"').AsString := 'Test';

>2) How do you obtain the field type from Interbase eg
>if ADM.TranType.FieldByName('Account').Datatype = ....

For TDataset descendants, you can use DataType. But for IBO native
components, use SQLType and SQLSubType properties(look for TIB_Column in
IBO's help file). You'll have to do some research on what they are, start
with IB 6 beta documentation in the Language reference volume.

>3)How do you obtain the Domain names from Interbase

There's a system table that is called RDB$FIELDS that contains all of the
domain names(user and system defined).

Daniel Rail
Senior System Engineer
ACCRA Group Inc. (
ACCRA Med Software Inc. (