Consultor Eletrônico



Kbase 18880: RTB Cannot Create a New Object as a Committed Buffer Exists
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   02/06/1999
SUMMARY:

Users can fool Roundtable into leaving an uncommitted schema
buffer lying around.

EXPLANATION:

To demonstrate this behavior:

1) Create a pfield object in a table.
2) Delete the WIP version of the table, reverting it to the
previous version.
3) Update the schema (skip the table) to make the table current.
4) Now delete the pfield object from the workspace
(this has to be performed after the schema update).
5) Check-out and expand the table.
6) Try to add the same new field again.

You will get a message that a committed buffer exits.

The committed buffers are records in either the rtb_dbase, rtb_file,
or rtb_flddef records that have a "version" prefixed with and extra
"1". You must find and delete these records manually.

SOLUTION:

Modify the following code to find, then delete the record.

Mcommitted-buf-found = no.
IF RA-obj-type = "PDBASE" THEN
Mcommitted-buf-found =
CAN-FIND(FIRST rtb.rtb_dbase
WHERE rtb.rtb_dbase.pmod = Ppmod
AND rtb.rtb_dbase.obj-type = RA-obj-type
AND rtb.rtb_dbase.object = Pobject
AND rtb.rtb_dbase.version = 1010000).
ELSE
IF RA-obj-type = "PFILE" THEN
Mcommitted-buf-found =
CAN-FIND(FIRST rtb.rtb_file
WHERE rtb.rtb_file.pmod = Ppmod
AND rtb.rtb_file.obj-type = RA-obj-type
AND rtb.rtb_file.object = Pobject
AND rtb.rtb_file.version = 1010000).
ELSE
IF RA-obj-type = "PFIELD" THEN
Mcommitted-buf-found =
CAN-FIND(FIRST rtb.rtb_flddef
WHERE rtb.rtb_flddef.pmod = Ppmod
AND rtb.rtb_flddef.obj-type = RA-obj-type
AND rtb.rtb_flddef.object = Pobject
AND rtb.rtb_flddef.version = 1010000).

IF Mcommitted-buf-found THEN DO:
MESSAGE
"Cannot create a new object as a committed buffer
exists for object version."
VIEW-AS ALERT-BOX ERROR
TITLE "Roundtable New Object".
RETURN "Cancel".
END.