Method Description Parameter Return Values
Connect Provides a connection to the
Sterling Connect:Direct server.
Connect() with a void parameter
connects to the hostname and
port specified in the client
configuration file.
void or a
pointer to an
IP address
and port.
CD_SUCCESS or
CD_FAILURE
DisConnect Disconnects the current session. void CD_SUCCESS or
CD_FAILURE
SendCommand Sends a Sterling Connect:Direct
command to the server for
processing.
Pointer to a
command
text buffer.
CD_SUCCESS or
CD_FAILURE
ReceiveResponse Receives the response from a
previously issued command,
such as the select statistics
command.
void CD_SUCCESSor
CD_FAILURE
GetResponse Retrieves the response from the
ReceiveResponse call.
void Pointerto a
response buffer.
GetResponseLength Returns the length of the
previously received response
buffer.
void Lengthof the
response buffer from
the previously
issued call.
MoreData Returns a value indicating if
outstanding data from the
previously issued send
command call is available. If the
return value is TRUE, call
ReceiveResponse again to
retrieve more data.
void TRUE—Ifmore data
is outstanding.
FALSE—If no data
is outstanding.
GetCommandName Returns the command name of
the previously issued send
command, such as the submit
command.
void Pointerto a
command name
buffer.
GetProcessNumber Returns the Process number of a
previously issued submit
command.
void Processnumber of a
submit command.
-1—If no submit
command can be
found.
GetProcessCount Returns the number of Processes
affected by the last send
command that issued a delete,
change, or flush process.
void Processnumber of a
submit command
that issued a delete,
change or flush
process.
-1—If no submit
command can be
found.
GetCurrentError Moves the error data pointer to
the current error in the list.
void TRUE—Ifsuccessful
FALSE—If no
current error exists.
GetNextError Moves the error data pointer to
the next error in the list.
void TRUE—Ifsuccessful
FALSE—If no more
errors are found.
Chapter4. Writing Custom Programs 71