ODBC Server Reference Manual
Stored Procedures
HP NonStop ODBC Server Reference Manual—429151-002
5-30
SPELIB Interface
by the server. If this attempt fails, the NonStop ODBC Server issues an error message
to the client. The following example illustrates this action.
SP_SRV_SET_CURRENT_VERSION
This function sets up the current SPELIB version number. The function is used to
negotiate SPELIB versions between requester and server, and should be called when
the function SP_SRV_DECODE_INIT returns the error
SPELIB_VERSION_NOT_SUPPORTED (For more information, see description of
SP_SRV_DECODE_INIT ).
env
input
is a pointer to the environment object STRUCT.
NonStop ODBC Server
PATHSEND(...)
PATHSEND terminates.
Decode the reply buffer.
Try the process again using
the returned SPELIB version.
Pathway Server
Read from $RECEIVE
...
rc = SP_SRV_DECODE_INIT (senv,... )
If (rc==SPELIB_VERSION_NOT_SUPPORTED)
{
/* Allocate reply buffer with */
/* length SPELIB_MIN_BUFFER_SIZE */
SP_SRV_ENCODE_INIT
(senv,replybuf,...)
/* Set current SPELIB version */
SP_SRV_SET_CURRENT_VERSION (senv);
/* Set SPELIB error */
SP_SRV_ENCODE_SPELIB_ERROR
(senv,rc);
/* Reply to PATHSEND. */
REPLY (replybuf,len);
}
short int SP_SRV_SET_CURRENT_VERSION ( void * env )