[gnome-db] gda_connection_get_schema
- From: Piotr Pokora <piotrek pokora gmail com>
- To: gnome-db-list gnome org
- Subject: [gnome-db] gda_connection_get_schema
- Date: Tue, 6 Mar 2007 14:02:29 +0100
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]