c_openinsert.c

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

Generated on Sun Apr 6 17:31:38 2008 for GRASS by  doxygen 1.5.5