Subject | Re: [IBO] Converting BDE to IBO |
---|---|
Author | Helen Borrie |
Post date | 2005-11-04T05:02:09Z |
At 01:31 AM 4/11/2005 -0300, you wrote:
Go to your IBODatabase.FieldEntryTypes property and select fetSQLType (set
it True to add it to the set). Then open the preoperty editor for
ColumnAttributes (it's a stringlist). For each field in the database that
you want to be Boolean, make an entry like this:
mytable.mybooleanfield=BOOLEAN='T','F'
Of course, if you use other characters instead of T and F, enter those,
with the "True" value first.
mytable.mybooleanfield=BOOLEAN='Y','N'
Even better would be if you had defined a Boolean domain in your database
and then define each Paradox logical field to be this domain. Here's a
typical declaration of a Boolean domain:
create domain D_BOOLEAN as char
check (value is null or value in('T','F'));
Or, if you always want your Booleans to be non-null, do it like this:
create domain D_BOOLEAN as char
default 'F' NOT NULL
check (value in('T','F'));
IBO will make life really easy for you if you this. Add fetDomainName to
the FieldEntryTypes set and then make your ColumnAttributes entry like this:
D_BOOLEAN=BOOLEAN='T','F'
Helen
>Hi Alan,Do it with FieldEntryType and ColumnAttributes.
>
> > no the IBO components are TDataset descendants, they have persistent fields
> > in the same way that TTable does. Double click on the components to get the
> > field list and add all fields. then select the one you want to be boolean
> > and set the properties for tru and false values.
>
>I just can't find these properties where I can set tru and false values... :-(
>The field at .fdb is a char(1), and in IBOTable its a TStringField...
Go to your IBODatabase.FieldEntryTypes property and select fetSQLType (set
it True to add it to the set). Then open the preoperty editor for
ColumnAttributes (it's a stringlist). For each field in the database that
you want to be Boolean, make an entry like this:
mytable.mybooleanfield=BOOLEAN='T','F'
Of course, if you use other characters instead of T and F, enter those,
with the "True" value first.
mytable.mybooleanfield=BOOLEAN='Y','N'
Even better would be if you had defined a Boolean domain in your database
and then define each Paradox logical field to be this domain. Here's a
typical declaration of a Boolean domain:
create domain D_BOOLEAN as char
check (value is null or value in('T','F'));
Or, if you always want your Booleans to be non-null, do it like this:
create domain D_BOOLEAN as char
default 'F' NOT NULL
check (value in('T','F'));
IBO will make life really easy for you if you this. Add fetDomainName to
the FieldEntryTypes set and then make your ColumnAttributes entry like this:
D_BOOLEAN=BOOLEAN='T','F'
Helen