# Managing values

Values returned by functions of managing data are GdaValue objects. GdaValue class has many functions to access data, so we show the most important ones of them:

- gda_value_free()
- gda_value_is_null()
- gda_value_copy()
- gda_value_compare()
- gda_value_stringify()

There are many functions to know what is the type of a value and to manage values, that can be seen in GdaValue class.

We will return to the examples about last section to notice some important details:

            void
            show_table2 (GdaDataModel * dm)
            {
              gint row_id;
              gint column_id;
              GdaValue *value;
              GdaRow *row;
              gchar *string;

              for (column_id = 0; column_id < gda_data_model_get_n_columns (dm);
                   column_id++)
                g_print("%s\t",gda_data_model_get_column_title (dm, column_id));
              g_print("\n");

              for (row_id = 0; row_id < gda_data_model_get_n_rows (dm); row_id++)
                {
                  row = (GdaRow *) gda_data_model_get_row (dm, row_id);
                  for (column_id = 0; column_id < gda_data_model_get_n_columns (dm);
                       column_id++)
                    {
                      value = gda_row_get_value (row, column_id);
                      string=gda_value_stringify (value);
                      g_print ("%s\t", string);
                      gda_value_free(value);
                      g_free(string);
                    }
                  g_print ("\n");
                }
            }

  Loop for writing column names.
  Outer loop obtaining rows using gda_data_model_get_row ()
  Inner loop obtaining the value using gda_row_get_value () . Notice that gda_row_get_value () doesn't return a const GdaValue, so we have to free it.
  We have the difference here. As you can see above, gda_value_stringify () does not return a const gchar *, so you have to free it. First way is quite attractive but it is not good.