Re: [gnome-db] gda_connection_get_schema
- From: Piotr Pokora <piotrek pokora gmail com>
- To: gnome-db-list gnome org
- Subject: Re: [gnome-db] gda_connection_get_schema
- Date: Tue, 6 Mar 2007 17:22:29 +0100
Piotr Pokora <piotrek pokora gmail com> wrote:
> However , I am a bit confused now.
> Is gda_data_model_get_column_index_by_name correctly implemented then?
> It uses gda_data_model_get_n_columns, which can not work ( and does not ).
This does not work ( or I do something odd )
nbcols = gda_data_model_get_n_columns (model);
for(ncol = 0; ncol < nbcols; ncol++) {
if(g_str_equal (name, gda_data_model_get_column_title (model, ncol))) {
ret = ncol;
break;
}
}
This works without any problem:
nbcols = gda_data_model_get_n_rows (model);
for(ncol = 0; ncol < nbcols; ncol++) {
const GValue *value = gda_data_model_get_value_at(model , 0, ncol);
if(g_str_equal (name, g_value_get_string(value))) {
ret = ncol;
break;
}
}
Or at least I created model with the parameters I mentioned here.
Piotras
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]