Ns_PdDbCancel

Name

Ns_PdDbCancel -- Cancel the current database operation.

Syntax

void Ns_PdDbCancel (void *handle);

Description

This function cancels the current database operation. If the cancel operation was successful, this function should call Ns_PdSendString with OK_STATUS. On failure, the function should use Ns_PdSendString to return an error string.

Pseudo-code Example

/* DBMSState and DBMSCancel are your DBMS-specific structures and calls. */

void
Ns_PdDbCancel(void *handle) {
  DBMSState       *state = (DBMSState *) handle;
  Ns_PdLog(Trace, "cancel:");
  if (DBMSCancel(state) == NS_ERROR) {
    Ns_PdSendException(state->exceptionCode, state->exceptionMsg);
  } else {
    Ns_PdSendString(OK_STATUS);
  }
}