[libgda/LIBGDA_4.0] WritableSelect example corrections
- From: Vivien Malerba <vivien src gnome org>
- To: svn-commits-list gnome org
- Subject: [libgda/LIBGDA_4.0] WritableSelect example corrections
- Date: Wed, 8 Jul 2009 19:23:36 +0000 (UTC)
commit 1afc36eb72d79d7ce069dfe4fb04b423f418c9a5
Author: Vivien Malerba <malerba gnome-db org>
Date: Wed Jul 8 14:26:39 2009 +0200
WritableSelect example corrections
samples/WritableSelect/example.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/samples/WritableSelect/example.c b/samples/WritableSelect/example.c
index b3c651b..c6246fe 100644
--- a/samples/WritableSelect/example.c
+++ b/samples/WritableSelect/example.c
@@ -103,7 +103,7 @@ main (int argc, char *argv[])
list = g_list_append (NULL, NULL);
g_value_set_string ((name = gda_value_new (G_TYPE_STRING)), "Hiro");
list = g_list_append (list, name);
- if (! gda_data_model_append_values (model, list, &error)) {
+ if (gda_data_model_append_values (model, list, &error) == -1) {
g_print ("Could not add a row: %s\n",
error && error->message ? error->message : "No detail");
exit (1);
@@ -121,7 +121,7 @@ main (int argc, char *argv[])
g_print ("\n\n** Modifying row 2\n");
g_value_set_string ((name = gda_value_new (G_TYPE_STRING)), "Tom");
if (! gda_data_model_set_value_at (model, 1, 2, name, &error)) {
- g_print ("Could not modify row 3: %s\n",
+ g_print ("Could not modify row 2: %s\n",
error && error->message ? error->message : "No detail");
exit (1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]