Re: [gnome-db] introspection issue

Vivien Malerba <[email protected]>
Newsgroups gmane.comp.gnome.db
Message-ID <[email protected]>
On 8 April 2011 22:12, Murray Cumming <[email protected]> wrote:
> GObject+Introspection is working quite well for me now with libgda.
> Thanks. I am glad that pygda is now obsolete, so it's one less module
> for me to maintain.
>
> However, I'm getting an error when trying to get the values from the
> DataModel with get_value_at(). For instance, this script
> http://git.gnome.org/browse/pygda/tree/examples/gda/select.py?h=introspection
> produces this error:
>
> Traceback (most recent call last):
>  File "./select.py", line 61, in <module>
>    main ()
>  File "./select.py", line 57, in main
>    print "        value=", data_model.get_value_at(col_index,
> row_index);
>  File "/opt/gnome230/lib/python2.7/site-packages/gi/types.py", line 44,
> in function
>    return info.invoke(*args)
> TypeError: unknown type (null)
>
>
> Presumably it doesn't like GdaValues with GType=0 (when
> gda_value_is_null(gvalue) is true).

Yes, the a GValue with a 0 GType represents a SQL NULL value, whereas
if the returned value is NULL (the C NULL) then it means there was an
error retreiving the value, hence the difference between the 2.

Regards,

Vivien
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.