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

Update the contents of the cursor's current row using a binding array.

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

Postcondition:
The cursor is positioned on the inserted row.
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: invalid cursor handle, relative field binding is null, number of fields bound <=0.
  • 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_ESTATE The table or row is locked, or the cursor does not support update operations.

See also:
get_db_error, clear_db_error, Error Handling


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