Subject RE: Post/Cancel : (was [IBO] Rollbacks)
Author Malcolm Smith
Is this more correct under my cicumstances:

<< -- >> I'm not sure about the transaction line (borrowed it from another
demo) since I am not doing explicit transactions.


void __fastcall TdmSprite::qryGroupsAfterClose(TIB_Dataset *IB_Dataset)
{
if(transMaster->Started && !transMaster->InTransaction)
{
try
{
if(IB_Dataset->Modified)
{
// ask the user, then...

transMaster->Post();
transMaster->Commit();
}
else
IB_Dataset->Cancel();
}

catch(...)
{
transMaster->Rollback();
}
}
}


Malcolm Smith
MJ Freelancing
ABN: 30 671 763 146
http://www.mjfreelancing.com