2009/7/29 Piotr Pokora <[email protected]>

> Hi!
>
> I was wondering if it makes sense to submit a new bug.


I'm not making any corrections to V3 anymore as the V4 is there and I don't
have time to support V3 (also, don't expect any V3 release anymore either).


>
> Basically, there some inconsistency in the way how SQLite supports BLOBs.
>
> First code which runs:
>
> const gchar *sql = "SELECT binary_field FROM tbl";
> command = gda_command_new (sql, GDA_COMMAND_TYPE_SQL, 0);
> model = gda_connection_execute_select_command (mgd->priv->connection,
> command, NULL, NULL);
> gda_data_model_dump (model, stdout);
>
> Data model is dumped and expected binary data are printed to stdout.
>
> Code which doesn't work:
>
> const gchar *sql = "SELECT binary_field FROM tbl WHERE guid=
> ##/*name:'binary' type:GdaBlob*/";
> GdaQuery *query = gda_query_new_from_sql (dict, sql, NULL);
>
> I would expect to initialize new GdaQuery but I get this warning instead:
>
> WARNING **: While adding to a GdaQuery: Blobs are not supported by the
> connection's provider and may be rendered incorrectly


In V3, SQLite did not support blobs, so you can try GdaBinary instead which
will probably work. Both GdaBlob and GdaBinary handle the same kind of data
(binary) but GdaBlob is meant to handle data using a specific API to
directly read or write from the blob whereas GdaBinary will transfer the
whole binary when the statement is run. GdaBlob is more for big blobs and
GdaBinary is definitaly not for big blobs.

Note that in V3, there were 2 ways to create statements: GdaCommand and
GdaQuery, each with their own set of advantages and limitations, and this is
the reason in V4 there is only one object which represents a statement: the
GdaStatement object, where most if not all of the V3 limitations have been
removed.


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

Reply via email to