ODBC Server Reference Manual

Stored Procedures
HP NonStop ODBC Server Reference Manual429151-002
5-39
SPELIB Interface
env
input
is a pointer to the environment object STRUCT.
message
input
is a pointer to the message to be returned to the client.
message-len
input
specifies the length, in bytes, of the message. The maximum is 256 bytes.
SP_SRV_ENCODE_RAISERROR
This function enables the server to encode a “raise error” message. The NonStop
ODBC server sends this message to the client. If the NonStop ODBC Server is run in
TSQL mode, the global variable @@error also is set to the error-num returned from
this function
The NonStop ODBC Server does not abort the transaction or terminate processing the
remainder of the messages coming back from server class. It is recommended,
however, that this message be the last one before SP_SRV_ENCODE_END_STMT or
SP_SRV_ENCODE_END_PROC.
env
input
is a pointer to the environment object STRUCT.
error-number
input
specifies the error number to be returned to the client.
message
input
is a pointer to the message text to be returned to the client.
message-len
input
specifies the length, in bytes, of the message. The maximum length is 255 bytes.
short int SP_SRV_ENCODE_RAISERROR
( void * env
, long int error-num
, char * message
, short int message-len
)