[gnome-db] GDA: segfault!!! (what did I do wrong???)



I don't have a semicolon at the end of my query cause it's not part of
SQL, and it's
a simple SELECT joe FROM Doe type query. Here is the code. INSERT works fine,
now I need to retrieve some data and that's just about all I'm going
to need from the
GDA library. So here is the code. It segfaults, and I want to know why.

Thanks,

Neil

--------------------------------------------------------------------------------

GdaCommand *cmd = gda_command_new(query,
  GDA_COMMAND_TYPE_SQL, GDA_COMMAND_OPTION_STOP_ON_ERRORS);

GdaDataModel *dm;

dm = gda_connection_execute_single_command(cnc, cmd, NULL);

g_assert(dm != NULL);

fprintf(stdout, "hello!!!\n");
fprintf(stdout, "hello %d\n", gda_data_model_get_n_rows(dm));
fflush(stdout);

--------------- output:

hello!!!
segfault

-------------------------



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