[gnome-db] gda_connection_execute_non_select_command ()



Hi Vivien,

Testing the new gda_connection_execute_non_select_command () function at the moment, but this function always returns -2. I have tested for both MySQL as PostgreSQL. The data is updated correctly in the database, but the return value is -2. Is this function still under construction?

Example use:

GdaCommand *command = NULL;
gint number = 0;

const gchar *sql = "update parts set price = 1.23 where part_id = '12345'"

command = gda_command_new (buffer, GDA_COMMAND_TYPE_SQL, GDA_COMMAND_OPTION_STOP_ON_ERRORS);

number = gda_connection_execute_non_select_command (connection, command, NULL, NULL);

printf("NUMBER !! %d\n", number)

gda_command_free (command);

Let me know if you see something obvious that I do wrong?

Thanks,
Bas.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]