PostgreSQL cannot update boolean value

Hello all,

Somehow the variable MFA_Enabled gets changed from a boolean FALSE to a 0. I use cSmartSQL to set up the SQL command. The variable MFA_Enabled gets changed somewhere along the line and I cannot see where or why.

Does anyone have a clue why that would be changed?


UPDATE accounts SET primary_account_num=5173,account_no=5173,account_type=‘N’,access_code=5173,prox_id=0,business_name=‘’,fname=‘Amax’,lname=‘Carl Jarred’,address=‘’,address1=‘’,city=‘’,state=‘’,zip=‘’,zip_2=‘’,country=‘’,phone0=‘+447785992155’,phone1=‘’,phone2=‘’,email=‘’,zone_hrs_no=0,lockedout=‘N’,alert_manager=‘N’,visit_count=47,play_wave_file_name=‘’,send_alarm_email=‘’,send_access_email=‘’,keypadzone=0,nrc=‘Y’,onsite=‘’,lastentry_date_time=‘2007-02-11 12:54:22’,lastexit_date_time=‘2007-02-11 12:54:22’,cell_service_provider=‘’,cell_phone_usrname=‘’,exempt_holiday_rule=‘N’,allow_late_exit=‘N’,override_keypad_zone=‘N’,never_lockout=‘N’,override_pms_lockout=‘N’,override_anti_passback=‘N’,override_anti_passin=‘N’,override_remove_onsite=‘Y’,is_future_movein=‘N’,sndtxtmsg=‘N’,sndtxtmsg0=‘N’,sndtxtmsg1=‘N’,rowid=2,mfa_code=-1,mfa_enabled=0 WHERE ( accounts.rowid = ‘2’ );

Other than that you mean?

Hi Greg,

Thanks for jumping in! Yes, somewhere it is being changed from False to 0 and True to 1… But, the SQL command fails because it is not True/False…


But you’re writing that code right? I did a quick search and did not find a “cSmartSQL” but lots of “SmartSQL” so I’m not sure what that is.

Had to go find the original class - I got this from the forum back many years ago when RB was in existence. It is a smartSQL class for realbasic by BKeeney Software. He translated it from

The problem has got to be within that. The source is not closed so I can go and step through to find when, where and why it is doing that.


1 Like

Make sure the library is set for Postgres. IIRC it can be set for the particular engine.