OnCommand Event  

The client has issued a command to the server.


Sub object_OnCommand ( [Index As Integer,] ByVal ClientId As Variant, ByVal Command As Variant, ByVal Parameters As Variant )


An integer value which uniquely identifies the client session.
A string that specifies the command that was sent to the server.
A string that contains any optional parameters that were sent to the server with the command. Any extraneous whitespace is removed, however quoted parameter values are unchanged.


The OnCommand event occurs after the client has sent a command to the server, but before the command has been processed. This event occurs for all commands issued by the client, including invalid or disabled commands. If the application wishes to handle the command itself, it must perform any processing and then call the SendResponse method to send the success or error code to the client. If the SendResponse method is not called, then the server will perform its default processing for the command.

After the command has been processed, the OnResult event handler will be invoked.

See Also

CommandLine Property, SendResponse Method, OnResult Event