Strange behaviour with boolean fields

Forum related to SQLite

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
yapt
Junior Boarder
Junior Boarder
Posts: 26
Joined: 17.06.2008, 20:32

Strange behaviour with boolean fields

Post by yapt »

Hello,

I have a table:

Code: Select all

CREATE TABLE [DbLibros] (
[NLibro] INTEGER  UNIQUE NOT NULL,
[SLibro] VARCHAR(80)  NOT NULL,
[SClave] VARCHAR(80)  NULL,
[SNombre] VARCHAR(50)  NULL,
[NTiempoSaltos] INTEGER DEFAULT '''''''0''''''' NULL,
[BDefecto] BOOLEAN  NULL
)
The strange behaviour below is the same with SqlAdministrator and with my app running standalone or inside Delphi IDE.

When I try to edit/post table updating BDefecto field (boolean) all seems ok, but when I restart SqlAdministrator or my delphi app (or refresh data), then all my changes on this boolean field seems to return to the original values. The first row (BDefecto field) is checked and the other rows are not.

Sometimes I got some rows (BDefecto field) with the value I want but the first row is always checked.

I am a bit lost and cannot continue.

Are there any thing to be aware with boolean fields ?

Greetings.
Post Reply