Board index » delphi » ADO Master/Detail and Batch Update Problem
ADO Master/Detail and Batch Update Problem
2007-03-26 05:36:11 PM
SQL Server 2000 Update Pack 4
XP service pack 2
BDS 2006 update pack 2
Master ADO Query SQL statement is: "select * from master order by idmaster;"
Detail ADO Query SQL statement is: "select * from detail where idmaster =
:idmaster order by iddetail;"
There is also a Foreign Key : "alter table detail add foreign key (idmaster)
references master (idmaster) on delete cascade;"
Detail ADO Query is linked to Master ADO Query through Master DataSource
Master and Detail CursorType = ctStatic, LockType = ltBatchOptimistic
When I execute Master UpdateBatch, alla data inserted or modified in the
Detail are deleted and can not be saved with Detail UpdateBatch
What's wrong in my code ?