Re: [gnome-db] gda_connection_execute_non_select_command ()



On 9/11/06, Bas Driessen <bas driessen xobas com> wrote:

 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?

No, you did nothing wrong. I did some code and as I was in a hurry I
did not test it properly. Anyway, the problem is in the new
gda_parameter_list_new_inline() function. Please apply the attached
patch and it should be better.

Cheers,

Vivien

Attachment: PATCH
Description: Binary data



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