Nerissa,
There's a bug in the cCursor class which is probably causing this.
The change is to the TABLEUPDATE() call in the delete method. See comments below.
Kevin says he's going to add this to the next release, so it should be safe to make the change directly in your cCursor class (of cDataEnv).
IF (tlImmediate AND CURSORGETPROP("BUFFERING")!= DB_BUFOFF);
OR INLIST(CURSORGETPROP("BUFFERING"), DB_BUFOPTRECORD, DB_BUFLOCKRECORD)
IF NOT TABLEUPDATE(tlDeleteAll)
SELECT (lnOldArea)
=TABLEREVERT()
=AERROR(laError)
lnRetVal = laError[AERROR_ERROR]
RETURN lnRetVal
ENDIF
ENDIF
>Hi Kevin,
>
>As with my previous email when I used SendChildMessage() method to send a "Delete" message to the child business object (thread #
666695), in my testing, I found that it works as long as my child business object uses row buffering. When I used table buffering, it doesn't work. The comments in the delete method says that "tlImmediate" parameter is used for table buffering. But whether I set tlImmediate to .F. or .T., as long as the child business object uses table buffering, the record is not deleted. I call this method in the delete() method of parent business object but before calling dodefault(). Here is my code.
>
> LPARAMETERS tlDeleteAll, tcAlias, tlImmediate
> *-------------------------------------------
> * The lines below are added to delete the
> * records in the child business object
> * when a record is deleted in its parent.
> *-------------------------------------------
> LOCAL lbretval
> IF this.lcascademessages
> lbretval=this.sendchildmessage("Delete", ".T.,,.T.")
> ENDIF
> lbretval=DODEFAULT(tlDeleteAll, tcAlias, tlImmediate)
> RETURN lbretval
>
>Does this mean that using SendChildMessage()method to send "Delete" command is not really created to handle table buffering? How can I handle it then?
>
>Thanks a lot.
>
>Nerissa Dela Rosa
>McFadden's