GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
d_update.c
Go to the documentation of this file.
1
15
#include <grass/dbmi.h>
16
#include "
macros.h
"
17
#include "
dbstubs.h
"
18
25
int
db_d_update
(
void
)
26
{
27
dbToken token;
28
dbCursor *cursor;
29
int
stat;
30
31
/* get the arg(s) */
32
DB_RECV_TOKEN
(&token);
33
cursor = (dbCursor *)
db_find_token
(token);
34
if
(cursor ==
NULL
|| !
db_test_cursor_type_update
(cursor)) {
35
db_error
(
"** not an update cursor **"
);
36
DB_SEND_FAILURE
();
37
return
DB_FAILED;
38
}
39
if
(!
db_test_cursor_any_column_flag
(cursor)) {
40
db_error
(
"** no columns bound in cursor for update **"
);
41
DB_SEND_FAILURE
();
42
return
DB_FAILED;
43
}
44
DB_RECV_TABLE_DATA
(cursor->table);
45
46
/* call the procedure */
47
stat =
db_driver_update
(cursor);
48
49
/* send the return code */
50
if
(stat != DB_OK) {
51
DB_SEND_FAILURE
();
52
return
DB_OK;
53
}
54
DB_SEND_SUCCESS
();
55
56
/* no results */
57
return
DB_OK;
58
}
lib
db
dbmi_driver
d_update.c
Generated on Sun Sep 9 2012 18:55:30 for GRASS Programmer's Manual by
1.8.1.2