INT fetches each row
that an executing statement returns. Each call to spqlfetch returns
a row from a statement to the caller's buffer. If bufptr contains
a NULL value, the routine returns a pointer to a buffer containing
the next row. If the value is not NULL, it assumes that the buffer
is owned by the caller and returns the data to the caller's buffer.
In either case, bufsize is updated with the
row length returned. Callers that use locate-mode SPQLFETCH() semantics
(that is, who specify bufptr as NULL) should
NEVER FREE the memory pointer returned by spqlfetch. A call to spqlfetch(),
after all rows for the statement are returned, returns a bufsize of
0.
Returns: 0
if successful; SPQL_ENDDATA if the statement has no more rows to return;
SPQL_FETCHFAILED if there is an unexpected failure while fetching
the next row buffer.