Sends a result completion message to the client.
int srv_senddone (
SRV_PROC * srvproc,
DBUSMALLINT status,
DBUSMALLINT info,
DBINT count );
Status flag | Description |
---|---|
SRV_DONE_FINAL | The current set of results is the final set of results. |
SRV_DONE_MORE | The current set of results is not the final set of results. |
SRV_DONE_COUNT | The count parameter contains a valid count. |
SRV_DONE_ERROR | The current client command received an error. |
SRV_DONE_RPC_IN_BATCH | The current set of results is the last set of results for the currently executing remote stored procedure. This value is used when multiple remote stored procedures are executed in a single batch. |
SUCCEED or FAIL.
A client request can cause the server to execute a number of commands and to return a number of result sets. For each result set, srv_senddone must return a result completion message to the client.
To indicate that there are more results for the current request, the Open Data Services server application must set the status field to SRV_DONE_MORE. To indicate that there are no more results for the current request, the Open Data Services server application must set the status field to SRV_DONE_FINAL. However, when an application function is installed as a Microsoft® SQL Server™ extended stored procedure instead of as a separate Open Data Services server application, use SRV_DONE_MORE. With extended stored procedures, SQL Server itself sends SRV_DONE_FINAL.
The count field indicates the number of rows affected by a command. If the count field contains a count, the SRV_DONE_COUNT flag should be set in the status field. This setting allows the client to distinguish between a count value of 0 and an unused count field.
Do not call srv_senddone from the SRV_CONNECT handler.