Re: Iters with mysql for performance (Was: Using gtkmm and mysql)



Both the C and C++ versions report this SQL syntax error. It's just that
you are ignoring the error in the C version. The attached C test code
shows how to catch the error in C.

This does seem wrong, so please do file the test case as a bug against
libgda. It would also be helpful if you could try this with libgda
3.99.x (or svn trunk) to see if it's still a problem with the new v4
API. I think that they are changing the code that parses SQL.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com

#include <libgda/libgda.h>

int main(int argc, char **argv)
{
  gda_init("Test", "0.1", argc, argv);

  GdaDict *dict;
  dict = GDA_DICT (gda_dict_new ());

  GdaQuery *query = gda_query_new (dict);

  GError* error = NULL;
  query = GDA_QUERY (gda_query_new_from_sql (dict, "SELECT * FROM table LIMIT 10", &error));
  if(error)
  {
    g_warning("GError caught: %s", error->message);
    g_clear_error(error);
  }

  return (0);
}


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