[gnome-db] gda_connection_get_schema



Hi!

<code>
GdaParameterList *paramlist = gda_parameter_list_new (NULL);
param = gda_parameter_new_string ("name", table_name);
gda_parameter_list_add_param (paramlist, param);

GdaDataModel *dm_schema = gda_connection_get_schema (cnc,
                        GDA_CONNECTION_SCHEMA_FIELDS,
                        paramlist, &error);

cols = gda_data_model_get_n_columns (dm_schema);
</code>

Problem is that cols is always 10 ( using MySQL provider ).
How should I create parameter list for the given schema model?

All I need is to find column name.
gda_data_model_get_column_index_by_name returns wrong values in such case
as GdaDataModel is incorrectly initialized for this purpose.

Any hint?

Piotras




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]