Re: [gnome-db] Problems with GnomeDbQuery



On 7/15/05, Daniel Espinosa <esodan gmail com> wrote:
> I have the following code:
> 
> GnomeDbQuery q_proyectos;
> GError error = NULL
> 
> /* I pass a valid pointer to a GnomeDbDict conf->dict */
> 
> q_proyectos = GNOME_DB_QUERY (gnome_db_query_new_from_sql (conf->dict,
> "SELECT * FROM proyectos", error));
> 
> but the program stops with a segmentation violation.
> 
> I tested the same query in mergeant and it works well.
> 
> Following the error I find some points calling the sql parser.
> 
> Any idea?

You should have:
GError *error = NULL;
and then
q_proyectos = GNOME_DB_QUERY (gnome_db_query_new_from_sql (conf->dict,
"SELECT * FROM proyectos", &error));

I don't know if it's enough but the error argument is definitely worth
a segmentation violation.

Cheers,

Vivien



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