Re: OTHER BIG BUG : deleting detail master delete



Setting the ['Unique Table'].value:='MyDetailTable' should have worked.
I've never had to use it (we primarily use the 2-tier model for updating
data), but several individuals on this forum said it works.

I don't think Del meant any disrespect. Too often individuals will start
"shouting" in a message about Delphi being full of bugs when if they looked
in the help file or better yet, Google, they would have found the answer.
Google is your friend. When it's not, this is it's pesky little brother
that searches only Borland newsgroups:
http://www.fulltextsearch.com/

Again, I highly recommend looking into using TClientDataSets in a 2-tier
model. It is extremely easy to setup and (for us anyway) easy to make
changes when (not if) requirements change. For example, we are completely
changing how we manage customer licensing in our system (different set of
tables, different set of business rules, etc). All we had to do was change
a couple of queries (Views) and a stored proc and we were done. No other UI
code needed to be changed. Development->Test->Production took less than an
hour. RAD development at it's finest :)

krf


"Cavalera Guido" <cavaleraguido@xxxxxxxxxxxx> wrote in message
news:4656ef10@xxxxxxxxxxxxxxxxxxxxxxxxx
This is "as designed" by Microsoft and not a bug.

Goooooooood very good ! Excuse me, if i dont have a relation on the
database and i want to delete 'simple' a detail record in a table, ADO
delete all !!!!!!!!$%$&%$/&%$ bill gates, M$, ADO, are very crazy ! IS
NOT POSSIBLE THIS ! ADO create a damage dont protect data integration !

Try
I thank u very much for your suggestions
Except
Del Murrey.... i joke but u dont know me and my problems to say this
things ...
End

Bye

--
Soluzioni Software di Gestione Aziendale
www.OnAzienda.it
"Kevin Frevert" <kevin@xxxxxxxxxxxxxxxxxxxxxxxx> ha scritto nel messaggio
news:4656d38f$1@xxxxxxxxxxxxxxxxxxxxxxxxx

"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






.



Relevant Pages

  • Re: ANN: Special kbmMW timelimited offer!
    ... On each master change, get a new matching detail record from the database. ... > What about Master-Detail support? ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: FK Relation
    ... >Yes the detail table has cascading delete too(at database level). ... >I use to connect ADO and OLEDB provider for sql server. ... Do you have any triggers on the Master table that update the master based on ... Borland's ADO components use all the fields in the record's selected fields to ...
    (borland.public.delphi.database.ado)
  • Re: OTHER BIG BUG : deleting detail master delete
    ... if i dont have a relation on the database ... and i want to delete 'simple' a detail record in a table, ADO delete all ... ADO create a damage dont protect data integration! ...
    (borland.public.delphi.database.ado)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)