Board index » delphi » Stop a record delete?

Stop a record delete?

Hi,

Try Cancelling the operation :

 If LastSupervisor=True then
        Table(or Query).Cancel;
BRegards,
Elio <eliom&hotmail.com>

 

Re:Stop a record delete?


Hi Thayne,
try "sysutils.abort"
instead of just "abort".
The fact that you get a compiler error suggests
that there might be scope problem with
"abort".
BTW - you should allways post error message
as well, so the others need not to guess
the exact cause of your problem.
--
Roman
(please remove STOPSPAM. in header)
URL:  www.rksolution.cz (Delphi corner)
MAIL: I...@rksolution.cz
Quote
Thayne wrote in message <713tkf$9...@forums.borland.com>...
>Hi,

>*Delete question?
>I scan a dataset to see if the record being deleted is the only
>"supervisor". How do I stop the record from being deleted after the
>user has confirmed delete.

>I tried "Abort" in the "on before delete" event. i.e.
>If LastSupervisor=True then
> Abort;

>This gives compiler error?

>Regards
>Thayne
>email tha...@lantic.co.za

Re:Stop a record delete?


Hi,

*Delete question?
I scan a dataset to see if the record being deleted is the only
"supervisor". How do I stop the record from being deleted after the
user has confirmed delete.

I tried "Abort" in the "on before delete" event. i.e.
If LastSupervisor=True then
        Abort;

This gives compiler error?

Regards
Thayne
email tha...@lantic.co.za

Re:Stop a record delete?


Thank You.

Regards
Thayne
email tha...@lantic.co.za

Re:Stop a record delete?


On Tue, 27 Oct 1998 20:07:21 +0100, "Roman Krejci"

Quote
<STOPSPAM.KRE...@MBOX.CESNET.CZ> wrote:
>try "sysutils.abort"
>instead of just "abort".
>The fact that you get a compiler error suggests
>that there might be scope problem with
>"abort".

Specifically, the BDE wrapper unit defines a token "Abort". So if the BDE
unit is in the Uses section of the unit in question *and* it appears after
the SysUtils unit, the BDE wrapper unit's definition of an "Abort" token
essentially "hides" that from the SysUtils unit. (The definition in the BDE
unit is seen first, which "hides" the other definition. But the SysUtils
definition is still available when the defining unit name is explicitly
used as a prefix. This is what Roman was describing.)

//////////////////////////////////////////////////////////////////////////
Steve Koterski                 "What is success in this world? I would say
Technical Publications         it consists of four simple things: to live
INPRISE Corporation            a lot, to love a lot, to laugh a lot, and
http://www.inprise.com/delphi  from it all, to learn a lot."
                                                     -- Richard J. Needham

Other Threads