Article View: borland.public.cppbuilder.database.ado
Article #823Re: cancel deleting of record
From: Borut
Date: Thu, 26 May 2005 07:29
Date: Thu, 26 May 2005 07:29
44 lines
1963 bytes
1963 bytes
Thank you for your help:)
Have a nice day!
Borut
"Ondrej Gratz" <gratzo@atlas.cz> wrote in message
news:42949367@newsgroups.borland.com...
> void __fastcall TDataModule1::NarocilniceBeforeDelete(TDataSet *DataSet)
> {
>
> if(DataModule1->ShemaT->RecordCount > 0)
> {
> ShowMessage("Delete data in Shema first!");
> Abort();
> }
> }
>
> Sincerely
> Ondrej Gratz
>
> Borut wrote:
>> Hello!
>>
>> I am using BCB6, ADO, MSSQL, DBNavigator
>> Is it possible to prevent a record to be deleted if user clicks Delete
>> button on Navigator.
>>
>> I tried like this, but a record is deleted anyway:
>>
>> void __fastcall TDataModule1::NarocilniceBeforeDelete(TDataSet *DataSet)
>> {
>>
>> if(DataModule1->ShemaT->RecordCount > 0)
>> {
>> ShowMessage("Delete data in Shema first!");
>> DataSet->Cancel();
>> }
>> }
>>
>> Thx in advance
>> Borut
>> Slovenia
>>
Technical Details
Message-ID:
<42957c26$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<429491d8@newsgroups.borland.com> <42949367@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,769db7213d949363 X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Borut" <borut@bokosoft.si> From: "Borut" <borut@bokosoft.si> Newsgroups: borland.public.cppbuilder.database.ado References: <429491d8@newsgroups.borland.com> <42949367@newsgroups.borland.com> Subject: Re: cancel deleting of record Date: Thu, 26 May 2005 09:29:03 +0200 Lines: 45 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 213.157.239.90 Message-ID: <42957c26$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1117092902 213.157.239.90 (26 May 2005 00:35:02 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail