On 7/15/05, Daniel Espinosa <[EMAIL PROTECTED]> 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
_______________________________________________
gnome-db-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-db-list

Reply via email to