c_openupdate.c

Go to the documentation of this file.
00001 #include "dbmi.h"
00002 #include "macros.h"
00003 
00010 db_open_update_cursor (driver, table_name, select, cursor, mode)
00011     dbDriver *driver;
00012     dbString *table_name;
00013     dbString *select;
00014     dbCursor *cursor;
00015     int mode;
00016 {
00017     int ret_code;
00018 
00019     db_init_cursor (cursor);
00020     cursor->driver = driver;
00021 
00022 /* start the procedure call */
00023     db__set_protocol_fds (driver->send, driver->recv);
00024     DB_START_PROCEDURE_CALL(DB_PROC_OPEN_UPDATE_CURSOR);
00025 
00026 /* send the argument(s) to the procedure */
00027     DB_SEND_STRING (table_name);
00028     DB_SEND_STRING (select);
00029     DB_SEND_INT (mode);
00030 
00031 /* get the return code for the procedure call */
00032     DB_RECV_RETURN_CODE(&ret_code);
00033 
00034     if (ret_code != DB_OK)
00035         return ret_code; /* ret_code SHOULD == DB_FAILED */
00036 
00037 /* get the results */
00038     DB_RECV_TOKEN(&cursor->token);
00039     DB_RECV_INT(&cursor->type);
00040     DB_RECV_INT(&cursor->mode);
00041     DB_RECV_TABLE_DEFINITION(&cursor->table);
00042     db_alloc_cursor_column_flags (cursor);
00043     return DB_OK;
00044 }

Generated on Sat Jul 22 22:05:40 2006 for GRASS by  doxygen 1.4.7