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 callsqlgetmsg()
for more information -2 No SQL session active. You must make a prior call tosqllogin()
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.
- 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.
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.
- Singleton SELECT (SELECT INTO)
The no data outcome returns if SELECT produces a result with 0 rows. No database values are assigned to the host variables. In this case, SELECT returns 100.
- Searched UPDATE
The no data outcome returns if no row satisfies search-condition. In this case, UPDATE returns 100.
- Searched DELETE
The no data outcome returns if search-condition is specified, but no row satisfies it. In this case, DELETE returns 100.
- INSERT
The no data outcome returns if INSERT included a query specification that produced no rows. In this case, INSERT returns 100.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |