General Diagnostics

Most normalized functions return the status values described in Table 4–3.

Table 4–3: Normalized Function Returns  
Return
Value
Description
 0
Successful completion.
-1
General failure. Check the SQLCODE or SQLSTATE1 status variables and call sqlgetmsg() for more information
-2
No SQL session active. You must make a prior call to sqllogin() to use this function.
-3
An attempt to reenter ESQL-LIB was encountered. ESQL-LIB is not reentrant or thread safe.
100
No data outcome.
  1. The value returned in SQLCODE or SQLSTATE provides a more specific indication of the error. For more information on SQLCODE and SQLSTATE, see Programming with ESQL."

The exceptions to these status values include functions that either return other functional data or do not return any values. These functions and their return values are listed in Table 4–4.

Table 4–4: Exceptional Function Returns  
Function
Return Values
sqlalloc() 
A pointer to an SQLVAR_T structure.
sqlald() 
A pointer to an SQLDA_T structure.
sqlcdbind() 
Only returns 0, -2, or -3. Never returns -1.
sqldinit() 
No value returned (void).
sqldsize() 
The number of bytes required to hold an SQLDA_T structure describing a specified number of columns (SQLVAR_T structures).
sqlgetmsg() 
A pointer to the next message in the ESQL message queue.

No Data Outcome

The following functions can return the no data outcome. In this case, a value of 100 returns.

These statements can also return the no data outcome.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095