2009/6/25 Massimo Cora' <[email protected]>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> say I've the following table on sqlite.
>
> create table foo (analyse_time DATE);
>
> and say that I populate its elements with
>
> insert into foo values (datetime ('now', 'localtime'));
>
> A select shows me this:
>
> sqlite> select * from foo;
> 2009-06-25 01:00:21
>
> But when I'm getting the GValue from the GdaDataModel I cannot use it as
> a GdaTimestamp. The only GType detected is GDate, but I need the time too.
>

2 solutions:
* if you can, use the timestamp type instead of date in the table
declaration: create table foo (analyse_time timestamp);
* specifically request that the GType for the "analyse_time" column must be
GDA_TYPE_TIMESTAMP when running the SELECT statement, using
gda_connection_statement_execute_select_full()

Regards,

Vivien
_______________________________________________
gnome-db-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-db-list

Reply via email to