Article View: borland.public.cppbuilder.database.ado
Article #1682OnEditError with ADO
From: Benjamin Pratt
Date: Mon, 29 Mar 2004 19:55
Date: Mon, 29 Mar 2004 19:55
11 lines
1439 bytes
1439 bytes
I am using a TADODataSet and I would like to use the OnEditError event to trap failures when the record is already locked by another user. However, the OnEditError is not called when the edit fails. I have looked at the pascal and determined the reason why. It is because the TADODataSet is throwing an EOleException but the VCL is only looking for EDatabaseError to trigger the OnEditError. All other exceptions, including EOleException are simply passed on. So, is there a way to get the ADO classes to throw EDatabaseError instead of EOleExceptions?
Technical Details
Message-ID:
<40687dff@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,502dc5b4878d0216,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-03-29 12:05:08 PST From: "Benjamin Pratt" <benjamin.pratt.getridofthis@verizon.net> Newsgroups: borland.public.cppbuilder.database.ado Subject: OnEditError with ADO Date: Mon, 29 Mar 2004 11:55:14 -0800 Lines: 13 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 24.130.93.201 Message-ID: <40687dff@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1080589823 24.130.93.201 (29 Mar 2004 11:50:23 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail