Re: [gnome-db] Problems with GnomeDbQuery
- From: Vivien Malerba <vmalerba gmail com>
- To: Daniel Espinosa <esodan gmail com>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] Problems with GnomeDbQuery
- Date: Fri, 15 Jul 2005 17:52:15 +0200
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]