Re: [gnome-db] gda_data_model_import_from_model ()

Massimo Cora' <[email protected]>
Newsgroups gmane.comp.gnome.db
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Vivien,

Vivien Malerba wrote:
> 
> 
> 2009/7/16 Massimo Cora' <[email protected] <mailto:[email protected]>>
> 
>     -----BEGIN PGP SIGNED MESSAGE-----
>     Hash: SHA1
> 
>     Hi,
> 
>     I'm using the gda_data_model_import_from_model () function in this way:
>     the *to and *from datamodels are select results.
>     I just want to append the results from the latter to the former, but
>     this error happens: "No INSERT statement provided".
> 
>     *to and *from have the same fields, and unfortunately I cannot compute a
>     single query to retrieve both at the same time. (let's say that I cannot
>     have the records ordered by desc/asc, but they must follow another
>     logic).
>     So my question is: how can I create a datamodel and append the records
>     I'd like to?
> 
> 
> The example in Libgda's sources: samples/TableCopy/table-copy.c,
> function copy_products_2() does exactly what you are trying to do. Maybe
> you can find where the problem is. Otherwise, I'd need a standalone
> example to work on.
> 

that example is fine but I'd like to do something different: I'd like to
merge (or better, to concatenate) the results of *to and *from
datamodels but without interacting with database (i.e. without
reflecting changes on a datamodel using INSERT statements).
I understand that to be modifiable the *to datamodel must be changed
with gda_data_select_set_modification_statement_sql (), but isn't there
a possibility to have a 'detached' model so that appending rows can be
done easily?

I need all this because I built an iterator on the GdaDataModel and I'd
like to keep the things coherent.

thanks and regards,
Massimo








-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkpgoJQACgkQcfVTgMRILk1yFACggVs15uR1+LnBjGRNDLZzy+uz
sqwAniGe94FFp68mlFy7dxMjt+cjMK8A
=Vuju
-----END PGP SIGNATURE-----
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.