Subject | Re: [IBO] Meaning of error message |
---|---|
Author | Helen Borrie (TeamIBO) |
Post date | 2002-03-02T15:21:08Z |
At 02:18 PM 02-03-02 +0000, you wrote:
In any case I
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:
dmTRUEFALSE=BOOLEAN=T,F
In this case, include the fetDomainName member in the FieldEntryTypes set.
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.
regards,
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
www.ibobjects.com
>Hello Hellen:[snip]
>
>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 programCool, now we get some useful information...
>CREATE DOMAIN dmTRUEFFALSE AS CHAR(1)Yes, it does. Firebird/InterBase doesn't have a Boolean type. Creating a
> DEFAULT 'T'
> NOT NULL
> CHECK (VALUE IN('T','F'));
>
>In my table I have a field as follows:
>
>Posted dmTRUEFALSE
>
>In my applications TIB_DATASOURCE.ONSTATECHANGED event I have the
>follows code:
>Var b : Boolean;
>b := MYQuery.FieldByName('Posted').AsBoolean;
>
>This causes the error.
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:
dmTRUEFALSE=BOOLEAN=T,F
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.
regards,
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
www.ibobjects.com