c_bindupdate.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*!
  2. * \file lib/db/dbmi_client/c_bindupdate.c
  3. *
  4. * \brief DBMI Library (client) - bind update
  5. *
  6. * (C) 1999-2008 by the GRASS Development Team
  7. *
  8. * This program is free software under the GNU General Public
  9. * License (>=v2). Read the file COPYING that comes with GRASS
  10. * for details.
  11. *
  12. * \author Joel Jones (CERL/UIUC), Radim Blazek
  13. */
  14. #include <grass/dbmi.h>
  15. #include "macros.h"
  16. /*!
  17. \brief ?
  18. \param cursor db cursor
  19. \return DB_OK on success
  20. \return DB_FAILED on failure
  21. */
  22. int db_bind_update(dbCursor * cursor)
  23. {
  24. int ret_code;
  25. /* start the procedure call */
  26. db__set_protocol_fds(cursor->driver->send, cursor->driver->recv);
  27. DB_START_PROCEDURE_CALL(DB_PROC_BIND_UPDATE);
  28. /* send the argument(s) to the procedure */
  29. DB_SEND_TOKEN(&cursor->token);
  30. DB_SEND_SHORT_ARRAY(cursor->column_flags,
  31. db_get_cursor_number_of_columns(cursor));
  32. /* get the return code for the procedure call */
  33. DB_RECV_RETURN_CODE(&ret_code);
  34. if (ret_code != DB_OK)
  35. return ret_code; /* ret_code SHOULD == DB_FAILED */
  36. /* no results */
  37. return DB_OK;
  38. }