return ret;
}
+/**
+ * gtk_form_fill_from_table:
+ * @form: a #GtkForm object.
+ *
+ */
+gboolean
+gtk_form_fill_from_table (GtkForm *form)
+{
+ GtkFormPrivate *priv;
+ gchar *sql;
+ GdaDataModel *dm;
+
+ gboolean ret = TRUE;
+
+ g_return_val_if_fail (IS_GTK_FORM (form), FALSE);
+
+ priv = GTK_FORM_GET_PRIVATE (form);
+
+ g_return_val_if_fail (IS_GDAEX (priv->gdaex), FALSE);
+
+ sql = gtk_form_get_sql (form, GTK_FORM_SQL_SELECT);
+
+ dm = gdaex_query (priv->gdaex, sql);
+ if (dm != NULL && gda_data_model_get_n_rows (dm) > 0)
+ {
+ ret = gtk_form_fill_from_datamodel (form, dm, 0);
+
+ g_object_unref (dm);
+ }
+
+ return ret;
+}
+
/* PRIVATE */
static void
gtk_form_set_property (GObject *object,
gchar *gtk_form_get_sql (GtkForm *form, GtkFormSqlType type);
gboolean gtk_form_fill_from_datamodel (GtkForm *form, GdaDataModel *dm, gint row);
+gboolean gtk_form_fill_from_table (GtkForm *form);
G_END_DECLS