Home » U++ Library support » U++ SQL » PostgreSql does not handle BOOL correctly
Re: PostgreSql does not handle BOOL correctly [message #60061 is a reply to message #59950] |
Thu, 27 July 2023 16:09   |
omari
Messages: 276 Registered: March 2010
|
Experienced Member |
|
|
In order to provide a test case, i have modified PostgreSql referance example by adding a bool field:
TABLE_(TESTPARTNER)
SERIAL_ (TESTPARTNER_ID) PRIMARY_KEY
STRING_ (TESTPARTNER_NAME, 200) INDEX
STRING_ (TESTPARTNER_ADDRESS, 200)
BOOL_ (IS_OK) <---------- field added
END_TABLE
and i have added a Where condition to the Query:
m_array.Query(IS_OK == true);
the result is: at runtime, it show this ERROR messages :
The operation has failed
SQL error:
ERREUR: l'opérateur n'existe pas : character = integer
LINE 1: ...RTNER_ADDRESS, IS_OK from TESTPARTNER where IS_OK = 1 order ...
^
HINT: Aucun opérateur ne correspond au nom donné et aux types d'arguments.
Vous devez ajouter des conversions explicites de type.
Error statement:
select TESTPARTNER_ID, TESTPARTNER_NAME, TESTPARTNER_ADDRESS, IS_OK from TESTPARTNER where IS_OK = 1 order by TESTPARTNER_NAME
regards
omari.
|
|
|
Goto Forum:
Current Time: Wed Jun 04 00:37:18 CEST 2025
Total time taken to generate the page: 0.10728 seconds
|