Re: OTHER BIG BUG : deleting detail master delete
- From: "Kevin Frevert" <kevin@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 25 May 2007 07:16:21 -0500
"Cavalera Guido" <cavaleraguido@xxxxxxxxxxxx> wrote in message
news:46567b2a@xxxxxxxxxxxxxxxxxxxxxxxxx
D2006+ADODataSet+SQLServer
In a master detail relation with transaction and batchoptimistic control,
happen that if i delete a detail record then in UpdateBatch also master
record is deleted from database table but not in a dataset !!!!
If you have a reference to the master table in the detail query, ADO tries
to be really smart and assume you want all related data in each joined table
deleted. This is "as designed" by Microsoft and not a bug.
Again, IMO, the best long term solution is to put the work on the server
(cascade delete trigger), not the client. If the target database is unknown
(could be MSSQL, Oracle, etc) and/or the DBA won't let you in 100ft of the
server, use TClientDataSet<->TDataSetProvider<->TADODataSet. You have
complete control over what SQL scripts are generated and compatible with
nearly all RDBMSs.
Good luck,
krf
.
- Follow-Ups:
- Re: OTHER BIG BUG : deleting detail master delete
- From: Cavalera Guido
- Re: OTHER BIG BUG : deleting detail master delete
- References:
- OTHER BIG BUG : deleting detail master delete
- From: Cavalera Guido
- OTHER BIG BUG : deleting detail master delete
- Prev by Date: Re: OTHER BIG BUG : deleting detail master delete
- Next by Date: Re: OTHER BIG BUG : deleting detail master delete
- Previous by thread: Re: OTHER BIG BUG : deleting detail master delete
- Next by thread: Re: OTHER BIG BUG : deleting detail master delete
- Index(es):
Relevant Pages
|