How to define updates for the following datatable

The statement looks like this

select
   d.del_date_allocation_id, d.region_id, d.del_date, 
   coalesce(d.stop_allocation,0) as stop_allocation, coalesce(d.piece_allocation,0) as piece_allocation,
   d.upd_user_id, r.name as region_name, count(distinct s.id) as stop_qty, 
   coalesce(sum(m.qty),0) as piece_qty
from
   del_date_allocation d
   join region r on (r.region_id = d.region_id+0)
   left join account_hub a on (a.del_date_allocation_pool_id = d.del_date_allocation_pool_id)
   left join sched_sale s on (s.del_date = d.del_date and s.region_id = d.region_id and s.account_id = a.account_id and s.salescheck_status_id in (1,5))
   left join sched_mdse m on (m.sched_sale_id = s.id)
where
   r.active_flag = 'Y'
group by
   d.del_date_allocation_id, d.region_id, d.del_date, d.stop_allocation, d.piece_allocation,
   d.upd_user_id, r.name
order by
   d.del_date, r.name

So obviously i do not need to update region_name, but only the fields from del_date_allocation table.

I tried to set ReadOnly to TRUE and LogChanges to FALSE for these fields on client-side in TDAMemDataTable but seems like updates are being generates anyway.

Thanks.

you need to define ReadOnly & LogChanges in schema on server-side, because delta commands (Insert/Update/Delete) are generated by server-side according to table schema

Thanks Evgeny, however even if i define them on server-side it does not help.

can you show SQL for Insert and/or Update delta commands?

you can generate them inside schema and remove later

P.S. have you refreshed table schema on client side after making changes on server-side?

Thanks Evgeny, i got it working. I missed to create statements for updates initially.