Name
Ns_PdDbSpGetParams -- Return output parameters from
stored procedure
Syntax
void Ns_PdDbSpGetParams (void
*handle)
Description
This function returns output parameters from a previously
executed stored procedure.
Pseudo-code Example
void
Ns_PdDbSpGetParams(void *handle) {
DBMSState *state = (DBMSState *) handle;
Ns_PdLog(Trace, "spgetparams:");
Ns_PdSendString(OK_STATUS);
if (state->outparamnames != NULL && state->outparamvalues != NULL) {
char *itemName, *itemVal;
int itemSize;
Ns_PdGetRowInfoItem(state->outparamnames, 0, &itemName,&itemSize);
Ns_PdGetRowInfoItem(state->outparamvalues, 0, &itemVal,&itemSize);
Ns_PdLog(Trace, "OutParamName '%s', value '%s'", itemName,itemVal);
Ns_PdSendRowInfo(state->outparamnames);
Ns_PdSendRowInfo(state->outparamvalues);
} else {
Ns_PdSendData(END_DATA, strlen(END_DATA));
}
}
|