GRASS Programmer's Manual  6.4.2(2012)
c_delete.c
Go to the documentation of this file.
00001 
00015 #include <grass/dbmi.h>
00016 #include "macros.h"
00017 
00026 int db_delete(dbCursor * cursor)
00027 {
00028     int ret_code;
00029 
00030     /* start the procedure call */
00031     db__set_protocol_fds(cursor->driver->send, cursor->driver->recv);
00032     DB_START_PROCEDURE_CALL(DB_PROC_DELETE);
00033 
00034     /* send the argument(s) to the procedure */
00035     DB_SEND_TOKEN(&cursor->token);
00036 
00037     /* get the return code for the procedure call */
00038     DB_RECV_RETURN_CODE(&ret_code);
00039 
00040     if (ret_code != DB_OK)
00041         return ret_code;        /* ret_code SHOULD == DB_FAILED */
00042 
00043     /* no results */
00044     return DB_OK;
00045 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines