SQLite, Boolean & AsBoolean...

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Runspect
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 17.12.2007, 21:53

SQLite, Boolean & AsBoolean...

Postby Runspect » 29.05.2016, 15:26

I try to update a Boolean field:

Code: Select all

ZQuery.FieldByName('FieldName').AsBoolean:= TRUE;
ZQuery.Post;
ZQuery.ApplyUpdates;
Connection.Commit;   


And It does not work, also I've tried (without success):
ZQuery.FieldByName('FieldName').AsInteger:= 1; //No error but nothing happens
ZQuery.FieldByName('FieldName').AsString:= 'Y'; //error: not boolean value

How can I make it work?

Runspect
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 17.12.2007, 21:53

Re: SQLite, Boolean & AsBoolean...

Postby Runspect » 29.05.2016, 15:55

I solved with changing "WHERE Field;" to "WHERE (Field= "Y");" in SQL stament.


Return to “ZeosLib 7.1 stable Forum”

Who is online

Users browsing this forum: No registered users and 1 guest