Boolean-Field
Posted: 01.11.2005, 20:14
I am using mysql and Delphi 5 with ZEOS just 2 weeks. I am trying to convert from another db to the zeos and mysql. It is really great but i have a problem with boolean. Like here:
http://dev.mysql.com/doc/refman/5.0/en/ ... rview.html
said, i am using tinyint(1) to save boolean-information.
i am using a query with requestlive=TRUE
i execute a sql-select-command and also get the result successful
now i doing this command:
Query.FieldByName('ABoolField').asboolean:=False;
and an error that is like this:
eDatabaseError ... The field aBoolField can not addressed (i do not know what word is the perfect translation for this) as Boolean.
so it means that it is NOT a boolean-Field.
if i use this command:
Query.FieldByName('ABoolField').asinteger:=0;
get no error.
Does there exist any way to use boolean? I don't want to change all to 0 and 1 instead of boolean.
thanks for every answer
Chaosworld
http://dev.mysql.com/doc/refman/5.0/en/ ... rview.html
said, i am using tinyint(1) to save boolean-information.
i am using a query with requestlive=TRUE
i execute a sql-select-command and also get the result successful
now i doing this command:
Query.FieldByName('ABoolField').asboolean:=False;
and an error that is like this:
eDatabaseError ... The field aBoolField can not addressed (i do not know what word is the perfect translation for this) as Boolean.
so it means that it is NOT a boolean-Field.
if i use this command:
Query.FieldByName('ABoolField').asinteger:=0;
get no error.
Does there exist any way to use boolean? I don't want to change all to 0 and 1 instead of boolean.
thanks for every answer
Chaosworld