Subject RE: [IBO] Refreshing data
Author Riho-Rene Ellermaa
I checked through my code again and found that refrehing usually works. The
refreshing problem occures only when I press Delete button in navigation
bar.



void __fastcall TDataModule2::QMasterCustomDelete(TIB_Dataset *IB_Dataset)
{
dynamic_cast<TFMaster *>(Owner)->RecordActions(3); <<--- this is the
function that refreshes current row and does necessary actions
}

void TFMaster::RecordAction(type)
{
if(!DModule->Trans->InTransaction) // uus katsetus
DModule->Trans->StartTransaction();
DSource->Dataset->InvalidateRowNum(DSource->Dataset->RowNum);
int stat=DSource->Dataset->FieldByName("STATUS")->AsInteger; << - for
debuging only
if(StringList->Count==0)
{ switch(type)
{ case 1: // Accept
FAccept(); break;
case 2: // remove accept
FPrepare(); break;
case 3:
FDelete(); (I'm using SP for deleting)
break;
}
}
}


Riho-Rene Ellermaa
senior programmer
Hansabank



> > I thought this line does it:
> > DSource->Dataset->InvalidateRowNum(DSource->Dataset->RowNum);
> >
> > If not, then what do use? I don't want to refresh whole dataset, but
only
> > bookmarked items
>
> That's one for Jason, I get away with Refresh nowadays.

What is your transaction isolation set to?
Did you do a commit in the tool that you made the changes with?

Jason Wharton




[Non-text portions of this message have been removed]