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

Use this forum for questions and answers regarding PostGreSQL and the PGDBE.
Post Reply
Message
Author
User avatar
unixkd
Posts: 579
Joined: Thu Feb 11, 2010 1:39 pm

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

#1 Post 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

k-insis
Posts: 126
Joined: Fri Jan 28, 2011 4:07 am

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

#2 Post 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"

Post Reply