Code: Select all
static HB_ERRCODE hb_rddCloseParentRel( AREAP pArea, void * pChildArea )
{
if( pArea->lpdbRelations )
{
LPDBRELINFO * lpdbRelationPtr = &pArea->lpdbRelations;
HB_USHORT uiArea = ( ( AREAP ) pChildArea )->uiArea;
do
{
LPDBRELINFO lpdbRelation = *lpdbRelationPtr;
if( lpdbRelation->lpaChild->uiArea == uiArea )
{
/* Clear this relation */
hb_rddSelectWorkAreaNumber( lpdbRelation->lpaChild->uiArea );
SELF_CHILDEND( lpdbRelation->lpaChild, lpdbRelation );
if( lpdbRelation->itmCobExpr )
hb_itemRelease( lpdbRelation->itmCobExpr );
if( lpdbRelation->abKey )
hb_itemRelease( lpdbRelation->abKey );
*lpdbRelationPtr = lpdbRelation->lpdbriNext;
hb_xfree( lpdbRelation );
}
else
lpdbRelationPtr = &lpdbRelation->lpdbriNext;
}
while( *lpdbRelationPtr );
}
return HB_SUCCESS;
}