Board index » delphi » Deleting Records -- Please Help
Todd K. Jone
![]() Delphi Developer |
Sat, 23 Mar 2002 03:00:00 GMT
|
Todd K. Jone
![]() Delphi Developer |
Sat, 23 Mar 2002 03:00:00 GMT
Deleting Records -- Please Help
I have a application that has a TADOQuery with the following SQL:
SELECT RS.*, C.Course_Name I have set the following properties: CursorLocation := clUseClient; When I try to delete a record from the resulting dataset (TADOQuery.Delete, "Insufficient key column information for updating or refreshing" Can anyone help me with this???? TKJ |
Brian Bushay Tea
![]() Delphi Developer |
Sun, 24 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpQuote>When I try to delete a record from the resulting dataset (TADOQuery.Delete, -- |
Todd K. Jone
![]() Delphi Developer |
Sun, 24 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpIt looks like ADO is trying to perform two deletes. One for each table in the FROM clause. This is not my intention. Is there a way to disable this? |
Todd K. Jone
![]() Delphi Developer |
Sun, 24 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpI found the problem (See thread called "How it works"). It seems that when using batch updates, ADO issues "DELETE" statements for each table in the FROM clause. Although there may be cases where someone wants it to work like this, I didn't want that for my application. I only wanted one DELETE statement issued for my primary table. To solve this problem, I put the following statement in my AFTEROPEN event code: QRegSelection.Recordset.Properties.Item['Unique Table'].Value := This caused ADO to only issue one delete statement for the table that I TKJ QuoteTodd K. Jones wrote in message <7tdspf$g4...@forums.borland.com>... |
Borla
![]() Delphi Developer |
Sun, 24 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpTodd K. Jones <jon...@omnisystems.com> wrote in message news:7tga8a$6tu3@forums.borland.com... Quote> QRegSelection.Recordset.Properties.Item['Unique Table'].Value := case this question comes up again. If you don't mind, can you tell me where you found this information? Mark |
Todd K. Jone
![]() Delphi Developer |
Sun, 24 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpI found it at the following link: http://msdn.microsoft.com/library/default.htm I then selected the following: - Platform SDK TKJ |
Sak
![]() Delphi Developer |
Sun, 24 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpQuote"Mark Edington (Borland)" wrote: maybe the solution by Todd work well in a variety os scenarios, but the is that nobody in borland thinked about this scenario ? I hate this situation, instead of putting the decisions and the fine look, I know there are a lot of dumb programmers out there, lot of like it or not, TUpdateSql was a control to permit us the behavior I have another idea: FIX the problem. -- |
Borla
![]() Delphi Developer |
Sun, 24 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpQuoteSak <s...@perio.unlp.edu.ar> wrote in message Quote> Mark, please, don't say to us that this "feature" was not tested ... By default this also test ADO itself and in fact turned up a number of different issues/bugs. However, when it comes to actually updating data this is always done by ADO and not the ADOExpress components. The issue Todd brought up would be the same regardless of which development Mark |
Hardy Ya
![]() Delphi Developer |
Mon, 25 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpSak, I find you post pretty pre-mature and offensive. The behaviour has nothing Just my $.02 and your milage may differ. Hardy QuoteSak wrote in message <37FBB05F.4F3A3...@perio.unlp.edu.ar>... |
Borla
![]() Delphi Developer |
Mon, 25 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpTodd K. Jones <jon...@omnisystems.com> wrote in message news:7tgdej$6tt9@forums.borland.com... Quote> I found it at the following link: page you can find out what it is by turning off the TOC. I'm not complaining mind you, it's just that one click is easier than 10 :). http://msdn.microsoft.com/isapi/msdnlib2.idc?theURL=/library/sdkdoc/d... Also, it's worth noting that is a new topic in the 2.5 SDK. I'm glad they Thanks again, Mark |
Sak
![]() Delphi Developer |
Mon, 25 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpQuote"Mark Edington (Borland)" wrote: and we all know that windows is broken, but a company like Borland must provide nice workarounds (like a TUpdateSql or insert/update/delete properties in the TADOQuery itself) instead of blaming M$ for their bugs. It was a *borland* decision (not a M$ one) to make ADO components, And the decision to remove TUpdateSql was your decision... (AFAIK) (and a pure ODBC solution would have been _much_ more desirable) -- |
Sak
![]() Delphi Developer |
Mon, 25 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpQuoteHardy Yau wrote: of control. look, M$ has years of history doing pretty bad software, if borland but if borland want to come up with a good and robust development and there is no much analysis to do, M$ is a factory of bad designed PS: sorry if you feel alluded about the dumb programmers for -- |
Hardy Ya
![]() Delphi Developer |
Tue, 26 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpIf Borland has to follow your recommendation, they might just be better off to retreat from Windows, anyway Windows is from M$. QuoteSak wrote in message <37FCE91A.24AE8...@perio.unlp.edu.ar>... |
Sergio A. Kessle
![]() Delphi Developer |
Fri, 29 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpQuoteHardy Yau wrote: M$ *BLINDLY* -- |
David Babi
![]() Delphi Developer |
Sat, 30 Mar 2002 03:00:00 GMT
Re:Deleting Records -- Please HelpMark Edington (Borland) <medington@_nolunchmeat_inprise.com> wrote in Quote> Todd K. Jones <jon...@omnisystems.com> wrote in message Quote> ad971h.htm still works. Usually. (at least in this case) |
1. deleting records -- please help quickly!
2. Error Record/Key Deleted, please help...
3. help deleting records, please
4. Record/Key deleted question...please help sec request
5. Delete a record in a TDBGrid with the Delete Key (and not Ctrl-Delete)
6. TTcpServer please help me oh, PLEASE PLEASE PLEASE HELP ME
7. dbgrid shows records a number of times - help help please