Progress
Programming
Handbook


Deleting Persistent Procedures

You can delete an instance of a persistent procedure using the DELETE PROCEDURE statement:

SYNTAX
DELETE PROCEDURE handle [ NO-ERROR ] 

This statement removes the procedure context specified by handle, a procedure handle to the context of a persistent procedure. If handle identifies a non-persistent procedure context or is otherwise invalid, the statement returns the ERROR condition. The NOERROR option allows you to ignore or trap statement ERROR conditions as you want.

When this statement completes execution, all resources defined in the specified procedure context are returned to the system and the procedure handle value ceases to be valid. The procedure handle is also removed from the session chain of persistent procedures. Any local buffers associated with the persistent context are disconnected and their data validated, possibly firing write triggers. If the validation fails, the DELETE PROCEDURE statement returns the ERROR condition and pends the deletion until all buffer validations succeed and any write triggers fire.

Note that if you execute the DELETE PROCEDURE statement in the context of the procedure you are deleting, the delete pends until execution leaves the persistent context and returns to the context of the calling external procedure. This happens when you execute the statement in a trigger or internal procedure that is defined within the persistent procedure.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095