Subject Re: [IBO] Meaning of error message
Author Helen Borrie (TeamIBO)
At 02:18 PM 02-03-02 +0000, you wrote:
>Hello Hellen:
>I have done all of the above and still had the problem.


In any case I
>started to think about what was different in this program

Cool, now we get some useful information...

> CHECK (VALUE IN('T','F'));
>In my table I have a field as follows:
>In my applications TIB_DATASOURCE.ONSTATECHANGED event I have the
>follows code:
>Var b : Boolean;
>b := MYQuery.FieldByName('Posted').AsBoolean;
>This causes the error.

Yes, it does. Firebird/InterBase doesn't have a Boolean type. Creating a
domain to represent a boolean does *not* make it a boolean...

But IBO can.

Go to the ColumnAttributes page of the dataset editor, find that column and
set its BOOLEAN attribute to True and enter the true and false values as
stored in the database.

Alternatively (better) go to the TIB_Connection and set it by its domain at
a global level in the ColumnAttributes array for the whole database. Just
make this one-line entry:


In this case, include the fetDomainName member in the FieldEntryTypes set.

>Can someone else try this to see if they get the same error?

I'm sure that one source of error will go away if you set things up
properly for your boolean domain.

You did the right thing to remove the call to Unprepare in your
FormClose. Firstly, you don't need it because it's already taken care
of. But you can always expect an error if you call Unprepare in
unprotected code. If you have this overwhelming urge to Unprepare a
dataset yourself, then always test first whether it is prepared.

Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at