Page 1 of 1

BOOLEAN FIELDS TRANSLATED TO '1' or '0' insteat of .t. or .f. in PG 16

Posted: Sat Feb 01, 2025 2:18 am
by unixkd
Hi all,

In SQLExpress, I uploaded a table from ADS/adt to Postgresql 16 using ODBC. Everything looks fine in pgAdmin 4. But when i make a cursor using SQLDataset():New()
and retrieve a boolean field in my test application, like oCursor:fieldget("myBooleanFld"), I get string "1" for TRUE and string "0" for FALSE instead of .t. or .f.

I appreciate your help

Thanks

Joe

Re: BOOLEAN FIELDS TRANSLATED TO '1' or '0' insteat of .t. or .f. in PG 16

Posted: Sun Feb 02, 2025 11:50 pm
by k-insis
You configured "Bools as char" in your ODBC data source.

Open 32bit control panel, go to configuration options, first page under "Data Type Options" uncheck "Bools as char"