srv_setevent

Activates an Open Data Services event outside the context of a client connection.


Important This Open Data Services function or macro is only supported in Microsoft® SQL Server™ version 7.0 for backward compatibility.


For more information about Open Data Services functions or macros supported for backward compatibility, see Open Data Services (Level 3).

Syntax

int srv_setevent (
SRV_SERVER * server,
int event );

Arguments
server
Is a pointer to the SRV_SERVER structure. Use srv_init to get this pointer.
event
Indicates the event to activate.

 

Event Description
SRV_EXIT Shuts down the server immediately, regardless of whether further client events are pending.
SRV_RESTART Continues the server after it has been paused.
SRV_SLEEP Pauses the server; no new connections are allowed.
SRV_STOP Disables new connections and then waits until all users have exited before shutting down the server.

Returns

SUCCEED or FAIL.

Remarks

The srv_setevent function is usually used to shut down, pause, or continue the server in response to a Windows NT Service Control Manager request, or inside a CTRL+C handler. Unlike srv_event, srv_setevent does not require a SRV_PROC client connection handle.

See Also
srv_event  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.