BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Deleting detail, master is deleted too !

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Cavalera Guido
Guest





PostPosted: Tue Apr 10, 2007 10:47 pm    Post subject: Deleting detail, master is deleted too ! Reply with quote



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 !!!!

Can u help me ?

Best regards GUIDO


--
Soluzioni Software di Gestione Aziendale
www.OnAzienda.it
Back to top
Arthur Hoornweg
Guest





PostPosted: Tue May 01, 2007 1:51 pm    Post subject: Re: Deleting detail, master is deleted too ! Reply with quote



Cavalera Guido wrote:
Quote:
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 !!!!

Can u help me ?

Best regards GUIDO



Lookup the property "Unique Table" in the ado documentation.

(After opening your dataset, set
MyAdodataset.recordset.properties['Unique Table'].value:='MyDetailTable',
or alternatively: download and use tbetteradodataset instead of
tadodataset. It has a property "unique_table" that does the same.)





--
Arthur Hoornweg

(In order to reply per e-mail, please just remove the ".net"
from my e-mail address. Leave the rest of the address intact
including the "antispam" part. I had to take this measure to
counteract unsollicited mail.)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.