Progress
Language Reference
DELETE OBJECT Statement
Deletes an instance of an object such as a widget, a procedure, a server, or a socket. Deleting the handle causes all allocated resources associated with the handle to be returned to the system.
SYNTAX
handle
A handle to the object to delete. The handle parameter must be a variable of type HANDLE and must contain a valid handle.
If the handle parameter refers to a widget handle, the DELETE OBJECT statement is a synonym for the DELETE WIDGET statement.
If the handle parameter refers to a persistent procedure handle or proxy persistent procedure handle, the DELETE OBJECT statement is a synonym for the DELETE PROCEDURE statement. This statement deletes a local persistent procedure handle immediately. For a proxy persistent procedure handle, this statement deletes
NOTE: This same behavior occurs if the remote procedure deletes itself (using DELETE...THIS-PROCEDURE) on the AppServer.
the handle immediately unless there is an outstanding asynchronous request on this
handle (handle:ASYNC-REQUEST-COUNT is greater than zero (0)). If handle:ASYNC-REQUEST-COUNT is greater than zero (0), this statement raises the ERROR condition. Otherwise, the statement also sends a request to the AppServer to delete the corresponding remote persistent procedure on the AppServer. If the AppServer is executing any asynchronous requests ahead of it, Progress queues the delete request (as with any asynchronous remote request) until the AppServer is available to handle it.For more information on remote persistent procedures, see Building Distributed Applications Using the Progress AppServer .
If the handle parameter refers to a server handle, the DELETE OBJECT statement:
- Checks that the handle parameter refers to a valid server handle, and that the handle parameter’s CONNECTED attribute is FALSE (no AppServer is connected to it). If one of these checks fails, the statement raises the ERROR condition.
- Deletes the handle immediately, if the server handle is valid, unless there is an outstanding asynchronous request on this handle (handle:ASYNC-REQUEST-COUNT is greater than zero (0)). If there is an outstanding asynchronous request, this statement raises the ERROR condition.
Deleting a server handle removes the handle from the server handle chain of the SESSION system handle, and resets SESSION:FIRST-SERVER and SESSION:LAST-SERVER if necessary. This also deletes all of the asynchronous request handles associated with the server and then deletes the server object.
If handle refers to an asynchronous request handle, the DELETE OBJECT statement takes one of the following actions:
- If the handle:COMPLETE attribute is FALSE, raises the ERROR condition.
- If the handle:COMPLETE attribute is TRUE, removes handle from the chain of asynchronous request handles referenced by the FIRST-ASYNC-REQUEST and the LAST-ASYNC-REQUEST attributes of the server handle, and deletes handle.
If this is a socket handle, the application must disconnect the socket from a port using the DISCONNECT( ) method before a socket object can be deleted. The DELETE OBJECT statement will raise ERROR if an application deletes a socket object that is still associated with a port.
If this is a server socket handle, the application must call DISABLE-CONNECTIONS( ) before a server socket object can be deleted. The DELETE OBJECT statement will raise ERROR if an application deletes a server socket object that is still listening for connections.
NO-ERROR
Suppresses reporting of errors that occur while DELETE OBJECT executes. Afterwards, you can get information on possible errors by checking the ERROR-STATUS system handle.
NOTES
- For more information on working with asynchronous remote procedures and event procedures, see the Building Distributed Applications Using the Progress AppServer manual.
- For more information on working with socket and server socket objects, see the Progress External Program Interfaces manual.
SEE ALSO
DELETE PROCEDURE Statement, DELETE WIDGET Statement, ERROR-STATUS System Handle
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |