[gnome-db] field's size from metastore



i'm trying to read field's size with gda_connection_get_meta_store_data but i get that the datamodel field doesn't contain INT, as specified in libgda documentation

that's the code snippet


error = NULL;
gval = gda_value_new (G_TYPE_STRING);
g_value_take_string (gval, table->name);
dm_fields = gda_connection_get_meta_store_data (gdacon,
                                                GDA_CONNECTION_META_FIELDS,
                                                &error,
                                                1,
                                                "name", gval);
if (dm_fields != NULL && error == NULL)
{
  rows = gda_data_model_get_n_rows (dm_fields);
  for (row = 0; row < rows; row++)
    {
g_message ("%d", g_value_get_int (gda_data_model_get_value_at (dm_fields, 3, row, NULL)));
    }
}


i'm using latest libgda 4.2 from git

what could be the problem?

thanks in advance



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