🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #5669

Re: Cancelling delete in BeforeDelete events ???

#5669
From: J. R. Antley
Date: Wed, 07 Mar 2001 01:09
40 lines
1763 bytes
Hi Sandi,

There is an horrible way to do it:

if (DeleteAllowed() == false)
{
  Abort();
}

Under the covers, this throws an exception and somebody catches it...  It
sux, but it will work.

JR

"Sandi Wijaya" <sandiwijaya@yahoo.com> wrote in message
news:3aa4a015_1@dnews...
> Hi, everyone.
>
> I want to cancelling a delete process, in BeforeDelete event.
> the code :
>
> void __fastcall TDM_MaintChqType::Q_chqtypeBeforeDelete(TDataSet *DataSet)
> {
> /* checking codition before delete the record */
> ...
> ...
>
> }
>
> So, if the condition isn't fulfilled then I want to return to the caller,
> because the event is void type, I can't do that. Then , how should I do
for
> breaking /cancelling the proses of delete ???
>
>
> Thank's in advance, someone.
>
>
>
>
Technical Details
Message-ID: <983u0o$ik06@bornews.inprise.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!feed-out.newsfeeds.com!newsfeeds.com!feed.newsfeeds.com!newsfeeds.com!newsranger.com!news.bnb-lp.com!bornews.borland.com!not-for-mail
References: <3aa4a015_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,a796c25e92fcc869
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-03-06 16:08:07 PST
From: "J. R. Antley" <jantley@phoenixdsl.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: Cancelling delete in BeforeDelete events ???
Date: Tue, 6 Mar 2001 17:09:42 -0800
Organization: Another Netscape Collabra Server User
Lines: 42
Message-ID: <983u0o$ik06@bornews.inprise.com>
References: <3aa4a015_1@dnews>
NNTP-Posting-Host: 64-6-178-230.den1.phoenixdsl.net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!feed-out.newsfeeds.com!newsfeeds.com!feed.newsfeeds.com!newsfeeds.com!newsranger.com!news.bnb-lp.com!bornews.borland.com!not-for-mail