Board index » delphi » DBCheckBox always gray when using postgreSQL.

DBCheckBox always gray when using postgreSQL.

When I used DBCheckBox to map with a boolean type data field in
PostgreSQL, it always grayed and can't reflect the data correctly.
Because it is always Selected in the grayed box.

If I edit it by this check box, first click makes it ungray. And the
second
click toggle selected status. But when I post it after changing the
Selected
status, it shows error:
   "Bad boolean external representation."

So how to fix it?  Thank you very much.

--
Best regards,
Diviner.

 

Re:DBCheckBox always gray when using postgreSQL.


Quote
> When I used DBCheckBox to map with a boolean type data field in
> PostgreSQL, it always grayed and can't reflect the data correctly.
> Because it is always Selected in the grayed box.

> If I edit it by this check box, first click makes it ungray. And the
> second
> click toggle selected status. But when I post it after changing the
> Selected
> status, it shows error:
>    "Bad boolean external representation."

> So how to fix it?  Thank you very much.

> --
> Best regards,
> Diviner.

P.S.:  I have already tried to set ValueChecked / ValueUnchecked to both

True / False and '1', '0' (to workaround with its odbc), but it seems no
use.

Re:DBCheckBox always gray when using postgreSQL.


Everybody,

Problem is solved! Don't quote up the string when you type the value into
ValueChecked or ValueUnchecked inside the Property Inspector. That's
means you just type 1 (or 0) into there instead of  '1' (or '0').

Enjoy PostgreSQL with Delphi.

--
Best regards,
Diviner.

Quote
> > When I used DBCheckBox to map with a boolean type data field in
> > PostgreSQL, it always grayed and can't reflect the data correctly.
> > Because it is always Selected in the grayed box.

> > If I edit it by this check box, first click makes it ungray. And the
> > second
> > click toggle selected status. But when I post it after changing the
> > Selected
> > status, it shows error:
> >    "Bad boolean external representation."

> > So how to fix it?  Thank you very much.

> > --
> > Best regards,
> > Diviner.

> P.S.:  I have already tried to set ValueChecked / ValueUnchecked to both

> True / False and '1', '0' (to workaround with its odbc), but it seems no
> use.

Other Threads