Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Data Types and Expressions > Expression >

Error Checking in ESQL/C

Aggregate functions always return one row. If no rows are selected, the function returns a NULL. You can use the COUNT (*) function to determine whether any rows were selected, and you can use an indicator variable to determine whether any selected rows were empty. Fetching a row with a cursor that is associated with an aggregate function always returns one row; hence, 100 for end of data is never returned into the sqlcode variable for a first fetch attempt.

You can also use the GET DIAGNOSTICS statement for error checking.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]