On 9/26/07, Murray Cumming <[EMAIL PROTECTED]> wrote:
> On Wed, 2007-09-26 at 10:29 +0200, Vivien Malerba wrote:
> > You can't use gda_data_model_get_value_at () when you are using a
> > cursor, that API call is for random access (I should make that clear
> > in the doc), here is my small correction:
> >
> > [...]
> > GdaDataModelIter *iter = gda_data_model_create_iter(model);
> >
> > /* fetch the GdaParameter in iter for the first column */
> > GdaParameter *param = GDA_PARAMETER (GDA_PARAMETER_LIST
> > (iter)->parameters->data);
> >
> > while(gda_data_model_iter_move_next(iter))
> > {
> > const int row = gda_data_model_iter_get_row(iter);
> > printf("row=%d\n", row);
> >
> > /*const GValue *value = gda_data_model_get_value_at(model, 0,
> > row);*/
> > const GValue *value = gda_parameter_get_value (param);
>
> That's a really horrible API. How do we get a value for a different
> column?
The point was just to show how to do it, the correct API to do it is:
param = gda_parameter_list_find_param (iter, "col_name")
Vivien
_______________________________________________
gnome-db-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-db-list