 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Borut Guest
|
Posted: Wed May 25, 2005 2:55 pm Post subject: cancel deleting of record |
|
|
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
|
|
| Back to top |
|
 |
Ondrej Gratz Guest
|
Posted: Wed May 25, 2005 3:01 pm Post subject: Re: cancel deleting of record |
|
|
void __fastcall TDataModule1::NarocilniceBeforeDelete(TDataSet *DataSet)
{
if(DataModule1->ShemaT->RecordCount > 0)
{
ShowMessage("Delete data in Shema first!");
Abort();
}
}
Sincerely
Ondrej Gratz
Borut wrote:
| Quote: | 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
|
|
|
| Back to top |
|
 |
Borut Guest
|
Posted: Thu May 26, 2005 7:29 am Post subject: Re: cancel deleting of record |
|
|
Thank you for your help:)
Have a nice day!
Borut
"Ondrej Gratz" <gratzo (AT) atlas (DOT) cz> wrote
| Quote: | 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
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|