ZeosLib 8.0.0, Firebird and a Query parameters
Posted: 14.04.2021, 23:46
Hi,
I have a problem with ZeosLib and its parameters.
I use Firebird 2.5, Embarcadero C++ Builder XE6, XE10 and XE10.3 Rio.
I can see difference between ZeosLib 7.2.4-stable and v8.0.0 Beta.
Code I use in my application is same for both above named versions of Zeos. The query which I use is
also same but difference is in INTEGER parameters which these Zeos version use for the query evaluating.
I activated ZSQLMonitor to see how is query evaluated.
In Zeos 7.2.4-stable I can see:
In Zeos 8.0.0 beta I can see:
There are 10 parameters where two are INTEGER (PP_ZIPCODE and PP_HOUSE_NUM) and
the others are VARCHAR parameters.
In 7.2.4 are Integer's parameters set as integer (549) while in 8.0.0 beta version I can see there
only empty apostrophes ('') which is unexpected 'value' of parameter I think.
Above mentioned "wrong" parameter ('') I have got in all versions C++ Builder where I installed
ZeosLib 8.0.0 beta (XE6 and XE10.3).
I have also disabled the TZParams (see DISABLE_ZPARAM) and I used TParams instead.
Result was same -> ('').
Question:
What should I do or change in my code to force Zeoslib v8.0.0 use the correct integer parameter, i.e. 549,
instead of an empty apostrophes ('')?
Thank you in advance for any help.
Vaclav
I have a problem with ZeosLib and its parameters.
I use Firebird 2.5, Embarcadero C++ Builder XE6, XE10 and XE10.3 Rio.
I can see difference between ZeosLib 7.2.4-stable and v8.0.0 Beta.
Code I use in my application is same for both above named versions of Zeos. The query which I use is
also same but difference is in INTEGER parameters which these Zeos version use for the query evaluating.
I activated ZSQLMonitor to see how is query evaluated.
In Zeos 7.2.4-stable I can see:
Code: Select all
2021-03-31 22:54:50 cat: Prepare, proto: firebirdd-2.5, msg: Statement 10 : SELECT ID_PLACE_POINT,PP_PLACE_CATEGORY_ID, PP_POINT_NAME, PP_POSITION_JTSKX, PP_POSITION_JTSKY, PP_STRPOSITION_JTSKX, PP_STRPOSITION_JTSKY, PP_REGION, PP_DISTRICT, PP_MUNICIPALITY_EXTACT, PP_ZIPCODE, PP_ZIPCODE_STR, PP_MUNICIPALITY, PP_STREET, PP_HOUSE_NUM, PP_HOUSE_NUMSTR, PP_ORIENT_HOUSENUM, PP_PHONE, PP_CATEGORY_TMP FROM PLACE_POINT_HEALTH WHERE ( (PP_POINT_NAME CONTAINING ?) OR (PP_REGION CONTAINING ?) OR (PP_DISTRICT CONTAINING ?) OR (PP_MUNICIPALITY_EXTACT CONTAINING ?) OR (PP_ZIPCODE CONTAINING ?) OR (PP_MUNICIPALITY CONTAINING ?) OR (PP_STREET CONTAINING ?) OR (PP_HOUSE_NUM CONTAINING ?) OR (PP_ORIENT_HOUSENUM CONTAINING ?) OR (PP_PHONE CONTAINING ?) )
2021-03-31 22:54:50 cat: Bind prepared, proto: firebirdd-2.5, msg: Statement 10 : '549','549','549','549',549,'549','549',549,'549','549',
2021-03-31 22:54:50 cat: Execute prepared, proto: firebirdd-2.5, msg: Statement 10
Code: Select all
'2021-04-14 23:04:44.652' cat: Prepare, proto: firebird, msg: Statement 12 : SELECT ID_PLACE_POINT,PP_PLACE_CATEGORY_ID, PP_POINT_NAME, PP_POSITION_JTSKX, PP_POSITION_JTSKY, PP_STRPOSITION_JTSKX, PP_STRPOSITION_JTSKY, PP_REGION, PP_DISTRICT, PP_MUNICIPALITY_EXTACT, PP_ZIPCODE, PP_ZIPCODE_STR, PP_MUNICIPALITY, PP_STREET, PP_HOUSE_NUM, PP_HOUSE_NUMSTR, PP_ORIENT_HOUSENUM, PP_PHONE, PP_CATEGORY_TMP FROM PLACE_POINT_HOSPITAL WHERE ( (PP_POINT_NAME CONTAINING ?) OR (PP_REGION CONTAINING ?) OR (PP_DISTRICT CONTAINING ?) OR (PP_MUNICIPALITY_EXTACT CONTAINING ?) OR (PP_ZIPCODE CONTAINING ?) OR (PP_MUNICIPALITY CONTAINING ?) OR (PP_STREET CONTAINING ?) OR (PP_HOUSE_NUM CONTAINING ?) OR (PP_ORIENT_HOUSENUM CONTAINING ?) OR (PP_PHONE CONTAINING ?) )
'2021-04-14 23:04:44.652' cat: Bind prepared, proto: firebird, msg: Statement 12 : '549','549','549','549','','549','549','','549','549'
'2021-04-14 23:04:44.663' cat: Execute prepared, proto: firebird, msg: Statement 12, affected row(s): 0, elapsed time: '00:00:00.006'
'2021-04-14 23:04:44.669' cat: Fetch complete, proto: firebird, msg: Statement 12, fetched row(s): 283
'2021-04-14 23:04:49.294' cat: Unprepare prepared, proto: firebird, msg: Statement 12
the others are VARCHAR parameters.
In 7.2.4 are Integer's parameters set as integer (549) while in 8.0.0 beta version I can see there
only empty apostrophes ('') which is unexpected 'value' of parameter I think.
Above mentioned "wrong" parameter ('') I have got in all versions C++ Builder where I installed
ZeosLib 8.0.0 beta (XE6 and XE10.3).
I have also disabled the TZParams (see DISABLE_ZPARAM) and I used TParams instead.
Result was same -> ('').
Question:
What should I do or change in my code to force Zeoslib v8.0.0 use the correct integer parameter, i.e. 549,
instead of an empty apostrophes ('')?
Thank you in advance for any help.
Vaclav