db_result_t db_qfetch ( db_cursor_t  hcursor,
const db_bind_t binds,
db_len_t  nbinds,
db_object_t  uobject 
)

Fetch data from the current row using a binding array.

db_qfetch is a convenience function that combines db_alloc_row and db_fetch. For best performance in tight loops, use db_alloc_row outside the loop and db_fetch inside the loop.

Parameters:
hcursor Cursor handle.
binds Array of bindings.
nfields Number of fields in binds.
uobject Row data for relative bindings. Use NULL if hrow does not contain relative bindings.
Returns:
On failure, one of the following error codes is set:
  • DB_EINVAL Caused by: invlid cursor handle, relative field binding is null.
  • DB_EBINDSIZE Invalid bind size.
  • DB_ERANGE Argument is out of range. Number of fields < 0 or number of feilds > binds.size.
  • DB_ENAME Invalid field name used in binding.
  • DB_ENOTFOUND Cursor is not positioned on a row. No data was read.

See also:
get_db_error, clear_db_error, Error Handling


Copyright © 2005-2008 ITTIA®. All rights reserved.