SPQLCONNECT() API Function

Establishes a connection to a specified server’s SQL processor.

Valid in: SPD Server

Syntax

int spqlconnect(char *constr, void **contok)

Required Arguments

constr

specifies all the connection information needed to establish the connection to the server’s SQL processor. When a connection is made successfully, a connection, token (contok) is returned to the caller.

char *constr

A null-terminated string identifying the server’s SQL processor to connect to for this session. The syntax for the string is identical to that used for the SAS PROC SQL pass-through CONNECT statement. For more information about SQL pass-through CONNECT statements, see Specify SQL Options by Using Explicit Pass-Through Code.

void **contok

Returns a connection token if the connection successfully completes. You must retain the token. Use it in subsequent SPQL library operations that you perform using the connection.

Details

Returns: 0 if successful; SPQL_NOMEM if unable to allocate memory for the connection token; SPQL_CONFAILED if unable to connect successfully to the server’s SQL processor.
Last updated: February 8, 2017