Thread View: borland.public.cppbuilder.database.ado
3 messages
3 total messages
Started by Borut
Wed, 25 May 2005 14:55
cancel deleting of record
Author: Borut
Date: Wed, 25 May 2005 14:55
Date: Wed, 25 May 2005 14:55
21 lines
1359 bytes
1359 bytes
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
Re: cancel deleting of record
Author: Ondrej Gratz
Date: Wed, 25 May 2005 15:01
Date: Wed, 25 May 2005 15:01
37 lines
2016 bytes
2016 bytes
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
>
>
Re: cancel deleting of record
Author: 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
>>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads