Retreive datatable schema command erases all clients events

in 10.0.0.1449, Retreive datatable schema command erases all fields events.

I double checked this behaviour by creating a new dataabstract vcl application with custom server and used the default pctrade schema. The i added on tbl_customer.name a onChange event. If i retreive the schema, the event is cleared.

im using delphi 10.3 update 2.

Hi,

You have assigned event to the some field, is it correct?

if yes, this is as expected because retrieving of schema does:

  • calls Fields.Clear;
  • reads every field from stream

workaround: you should reassign field events after loading table schema

Hello Evgeny,

my problem is that that happens in IDE when i right click on MemDataTable, a behavior that didn’t happen in the past. I know thata solution whould be to assign events on code.

Thanks for your reply.

Hi,

for client-calculated/located fields events will be preserved, but for usual fields, events will be lost always.
this behavior wasn’t changed for ages

Hi,
i beg to differ. As you can see on this screencast on version 9- that was the default behavior

Hi,
I can reproduce this behavior with the latest DA9 and can’t with DA10.
also I can’t find what code causes it because TDADataTable.LoadSchema method wasn’t changed…

Can you declare field events using business client rules as with table events? If true then you can fix that way. If dont I believe have no sense (and is incorrect) loading schema at design time delete fields events, dont you believe?

Thanks, logged as bugs://83273

I’ve found a reason for such failure. will fix.

1 Like

bugs://83273 got closed with status fixed.