|
|
Return output parameters from stored procedure
void Ns_PdDbSpGetParams(void *handle)
This function returns output parameters from a previously executed stored procedure.
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));
}
}