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 records

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





PostPosted: Wed Jun 07, 2006 7:19 pm    Post subject: Deleting records Reply with quote



I'm getting a lot of troubles trying to delete a single record from a
TADOQuery or TADODataSet containing an SQL SELECT with LEFT JOIN because get
an error.
Have I to use a separate TADOQuery per executing the DELETE command or what
else ?
Thanks in advance
Back to top
Darren
Guest





PostPosted: Wed Jun 07, 2006 7:23 pm    Post subject: Re: Deleting records Reply with quote



You need to specify the "unique table" property. This is exposed if you use
tBetterAdoDataset

"Davide Pasqualini" <bytetech (AT) libero (DOT) it> wrote in message
news:4486e000$1 (AT) newsgroups (DOT) borland.com...
Quote:
I'm getting a lot of troubles trying to delete a single record from a
TADOQuery or TADODataSet containing an SQL SELECT with LEFT JOIN because
get an error.
Have I to use a separate TADOQuery per executing the DELETE command or
what else ?
Thanks in advance


Back to top
Brian Bushay TeamB
Guest





PostPosted: Fri Jun 09, 2006 7:03 am    Post subject: Re: Deleting records Reply with quote



Quote:
I'm getting a lot of troubles trying to delete a single record from a
TADOQuery or TADODataSet containing an SQL SELECT with LEFT JOIN because get
an error.
Have I to use a separate TADOQuery per executing the DELETE command or what
else ?
Thanks in advance
You need to set the ADO property "unique Table" to the table in the join that

you want the delete to occur on

ADODataSet.Properties['Unique Table'].Value:='Name of a table';
It is best to set this in the table BeforeDelete event
--
Brian Bushay (TeamB)
Bbushay (AT) NMPLS (DOT) com
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.