Thank You Jan very much for the BeginUpdate / EndUpdate explanation! Until now I never had time problems, but now I will pay attention.
I heard about SQL injection attacks, but luckily until never met such problem, hopefully I never will
Tested that little sql : 'select ' ' from dual'. Just by itself it runs with no problems. But if I include any other tables, like
SQL.Add('select t.tnre, ');
SQL.Add(' '+#39+' '+#39+' as valami');
SQL.Add('from tst t');
SQL.Add('where tnre like '+#39+'115600%'+#39);
Immediately has the error. My program is very simple: on a form : ZConnection, ZQuery, Datasource and a DBGrid, all linked together.
Yeah, and a ZSQLMonitor. The generated log is the following:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2021-12-15 14:33:12 cat: Connect, proto: oracle-9i, msg: CONNECT TO "ETN03DB.prod.hu" AS USER "etndbhurep"
2021-12-15 14:33:12 cat: Execute, proto: oracle-9i, msg: SET TRANSACTION ISOLATION LEVEL DEFAULT
2021-12-15 14:33:14 cat: Prepare, proto: oracle-9i, msg: Statement 1 :
select t.tnre,
' ' as valami
from tst t
where tnre like '115600%'
2021-12-15 14:33:14 cat: Execute prepared, proto: oracle-9i, msg: Statement 1
2021-12-15 14:33:14 cat: Prepare, proto: oracle-9i, msg: Statement 2 : SELECT OWNER, TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, DATA_DEFAULT, COLUMN_ID FROM SYS.ALL_TAB_COLUMNS Where TABLE_NAME = 'TST' order by COLUMN_ID
2021-12-15 14:33:14 cat: Execute prepared, proto: oracle-9i, msg: Statement 2
2021-12-15 14:33:18 cat: Prepare, proto: oracle-9i, msg: Statement 3 : SELECT SYS_CONTEXT ('USERENV', 'CURRENT_SCHEMA') FROM DUAL
2021-12-15 14:33:18 cat: Execute prepared, proto: oracle-9i, msg: Statement 3
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thank You for Your help!
Zoltan