Boolean-Field

Forum related to version 6.1.5 of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Chaosworld
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 18.10.2005, 23:37

Boolean-Field

Post by Chaosworld »

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
sidekick
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 24.11.2005, 19:41

Post by sidekick »

Hello,

I had the same error today. I use te latest zeos version with d2005.
In previous version i did not had this error.

The boolean type works well with mssql.

Regards,
Erik
Chaosworld
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 18.10.2005, 23:37

Post by Chaosworld »

I changed my complett Programm this way, that i do not use the command: .asboolean=True/False i use now .asinteger=0/1
this works without any problem
This works with 6.1.5 and also with 6.5.1(alpha).
I am using 6.5.1(alpha) from the year 2004, cos this works with delphi 5, the new versions does not work with delphi 5. :-(

Chaosworld
Post Reply