Boolean, True != True
Posted: 01.04.2010, 21:04
Hello,
I have a problem with SQLite-Admin 0.8.3.2 .
I create a table in SQL Query - Tab that looks like this:
CREATE TABLE [Event] (
[IDX] INTEGER DEFAULT '1' PRIMARY KEY NOT NULL,
[B1] BOOLEAN DEFAULT 'False' NULL,
[B2] BOOLEAN DEFAULT 'False' NULL,
[B3] BOOLEAN DEFAULT 'True' NULL
);
Then I add some (7) items into the database that looks like this:
insert into Event ( B1, B2, B3) Values ( 'True', 'False', 'False') ;
After adding items I create a SQL Query that looks like this:
select * from event where B1 = 'True';
The result includes all seven items I added before.
So far , so good ... but
In the Edit Data- Tab I changed item 7 the value from B1 to false and update the database.
The query "select * from event where B1 = 'True';" returns 6 items, it's ok as well.
in the Edit Data- Tab, I change item 7, the value from B1 to true and update the database.
The query "select * from event where B1 = 'True';" gives back 6 items.
I repeat the procedure whit item 1.
now the result is 5 items long.
Why???
I have read in the forum, that 0 / 1 is standard, and should be used in place of True / False.
By using 0/1, there is no different, to the previous behavior.
Is this an (known) bug, or there is another explanation for this.
Thanks for the help / explanation.
I have a problem with SQLite-Admin 0.8.3.2 .
I create a table in SQL Query - Tab that looks like this:
CREATE TABLE [Event] (
[IDX] INTEGER DEFAULT '1' PRIMARY KEY NOT NULL,
[B1] BOOLEAN DEFAULT 'False' NULL,
[B2] BOOLEAN DEFAULT 'False' NULL,
[B3] BOOLEAN DEFAULT 'True' NULL
);
Then I add some (7) items into the database that looks like this:
insert into Event ( B1, B2, B3) Values ( 'True', 'False', 'False') ;
After adding items I create a SQL Query that looks like this:
select * from event where B1 = 'True';
The result includes all seven items I added before.
So far , so good ... but
In the Edit Data- Tab I changed item 7 the value from B1 to false and update the database.
The query "select * from event where B1 = 'True';" returns 6 items, it's ok as well.
in the Edit Data- Tab, I change item 7, the value from B1 to true and update the database.
The query "select * from event where B1 = 'True';" gives back 6 items.
I repeat the procedure whit item 1.
now the result is 5 items long.
Why???
I have read in the forum, that 0 / 1 is standard, and should be used in place of True / False.
By using 0/1, there is no different, to the previous behavior.
Is this an (known) bug, or there is another explanation for this.
Thanks for the help / explanation.