I have sqlite tables that were exported from MySQL with bit columns that indicates a boolean field.
My problem is that TLiteQuery maps BIT to a ftWideMemo type instead of ftBoolean or even ftInteger.
I am migrating my app to TLiteQuery from another library which does the mapping correctly.
Example:
Code: Select all
create table test(id integer primary key, myInt INT, myBool BIT);
insert into test(myInt, myBool) values (3, 1);
PRAGMA table_info(test);
cid|name |type |notnull|dflt_value|pk|
0|id |integer| 0|Null | 1|
1|myInt |INT | 0|Null | 0|
2|myBool|BIT | 0|Null | 0|
aQuery := TLiteQuery.Create;
aQuery.Connection := ..
aQuery.SQL.Text := 'select * from test';
aQuery.Open;
which returns:
id: ftInteger
myInt: ftInteger
myBool: ftWideMemo