Subject | Re: [firebird-support] Pseudo-Boolean woes |
---|---|
Author | Pavel Menshchikov |
Post date | 2005-02-21T18:49:35Z |
Hello Clay,
CS> I created a pseudo-Boolean domain (VarChar(1) with default 'F' value)
CS> However, at run time, I get "Invalid data conversion" when I attempt to
CS> access the field thus:
CS> qry.FldByName['LATEXALLERGY'].AsString;
CS> If I change the code to:
CS> qry.FldByName['LATEXALLERGY'].AsString;
CS> I get the following error at compile-time:
CS> "Incompatible Types: boolean and string"
CS> What can I do to access this string/boolean value?
CS> (Delphi 7, Firebird 1.5.2, FIB 6.1.0)
FIB+ treats your BOOLEAN domain as Delphi boolean field by default, so
either disable that feature of FIB+, or refer to the field value as
qry.FldByName['LATEXALLERGY'].AsBoolean.
HTH
--
Best regards,
Pavel Menshchikov
http://www.ls-software.com
CS> I created a pseudo-Boolean domain (VarChar(1) with default 'F' value)
CS> However, at run time, I get "Invalid data conversion" when I attempt to
CS> access the field thus:
CS> qry.FldByName['LATEXALLERGY'].AsString;
CS> If I change the code to:
CS> qry.FldByName['LATEXALLERGY'].AsString;
CS> I get the following error at compile-time:
CS> "Incompatible Types: boolean and string"
CS> What can I do to access this string/boolean value?
CS> (Delphi 7, Firebird 1.5.2, FIB 6.1.0)
FIB+ treats your BOOLEAN domain as Delphi boolean field by default, so
either disable that feature of FIB+, or refer to the field value as
qry.FldByName['LATEXALLERGY'].AsBoolean.
HTH
--
Best regards,
Pavel Menshchikov
http://www.ls-software.com