I have a DataSnap application made with C++Builder Berlin 10.1 and InterBase XE7, where the user could insert successfully records on a Usuarios table. Those records include a boolean type field that have a 'true' value that InterBase IBConsole shows as expected (true value). However, if I try a query filtering by that boolean field the result does not include that records no matter it's 'true' value.
Table: Usuarios
Field: Boolean Vigencia Not Null
Query: select * from USUARIOS where IDTIPOUSUARIO = 5 and VIGENCIA = :Vigencia order by NOMBRECOMPLETO asc
Params: Vigencia ftBoolean ptInput
If then I change the True value by False value with this query: "update Usuarios set Vigencia = False" and after that change again to the True value, then my application works well.
To create the records of the Usuarios table I'm using the Insert method and the specific Vigencia field value is completed this way:
DMCliente->CDS_Usuarios->FieldByName("Vigencia")->AsBoolean = true;
Why my query is no working properly at the first time without the necessary value change to False and then to True?
Connect with Us