Subject | RE: Post/Cancel : (was [IBO] Rollbacks) |
---|---|
Author | Malcolm Smith |
Post date | 2002-09-06T06:52:33Z |
This looks correct and seems to work. I tested scenarios and I only seem to
get transaction states of tsInactive and tsActivePending so I feel I'm on
the right track.
void __fastcall TdmSprite::qryGroupsAfterClose(TIB_Dataset *IB_Dataset)
{
if(transMaster->TransactionState == tsActivePending)
{
try
{
if(IB_Dataset->Modified)
{
// ask the user, then...
IB_Dataset->Post();
}
}
catch(...)
{
transMaster->Rollback();
}
}
}
Malcolm Smith
MJ Freelancing
ABN: 30 671 763 146
http://www.mjfreelancing.com
get transaction states of tsInactive and tsActivePending so I feel I'm on
the right track.
void __fastcall TdmSprite::qryGroupsAfterClose(TIB_Dataset *IB_Dataset)
{
if(transMaster->TransactionState == tsActivePending)
{
try
{
if(IB_Dataset->Modified)
{
// ask the user, then...
IB_Dataset->Post();
}
}
catch(...)
{
transMaster->Rollback();
}
}
}
Malcolm Smith
MJ Freelancing
ABN: 30 671 763 146
http://www.mjfreelancing.com