CancelAutoInc (undo autoincrement)

Top  Previous  Next


CancelAutoInc, VIRTUAL, PROC

The CancelAutoInc method restores the managed file to its pre-PrimeAutoInc state, typically when an insert operation is cancelled. CancelAutoInc returns a value indicating its success or failure. A return value of zero (0 or Level:Benign) indicates success; any other return value indicates a problem.


The CancelAutoInc method calls the FileManager.CancelAutoInc method for its primary file, passing SELF as the relation manager parameter.

Return value EQUATEs are declared in ABERROR.INC as follows:

! Severity of error

Level:Benign  EQUATE(0)

Level:User    EQUATE(1)

Level:Program EQUATE(2)

Level:Fatal   EQUATE(3)

Level:Cancel  EQUATE(4)

Level:Notify  EQUATE(5)

Return Data Type:     BYTE


WindowManager.TakeCloseEvent PROCEDURE


 IF SELF.Response <> RequestCompleted

 !procedure code

  IF SELF.OriginalRequest=InsertRecord AND SELF.Response=RequestCancelled

   IF SELF.Primary.CancelAutoInc()  !undo PrimeAutoInc - cascade


    RETURN Level:Notify



 !procedure code


RETURN Level:Benign

See Also:     FileManager.CancelAutoInc, FileManager.PrimeAutoInc