c_openinsert.c

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

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