[libgda: 2/23] Compatibility with the recent API
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda: 2/23] Compatibility with the recent API
- Date: Mon, 21 May 2018 15:10:34 +0000 (UTC)
commit a8a4e16f95f352a4dfb913c09b806a7efc49c53b
Author: Pavlo Solntsev <p sun fun gmail com>
Date: Fri Apr 27 22:42:50 2018 -0500
Compatibility with the recent API
examples/DDL/ddl.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/examples/DDL/ddl.c b/examples/DDL/ddl.c
index 80ed2bf94..ce6616407 100644
--- a/examples/DDL/ddl.c
+++ b/examples/DDL/ddl.c
@@ -29,12 +29,21 @@ main (int argc, char *argv[])
gda_init ();
GdaConnection *cnc;
+ GError *error = NULL;
+ gboolean closeresults = FALSE;
/* open connections */
cnc = open_connection ();
create_table (cnc);
display_products_contents (cnc);
- gda_connection_close (cnc);
+ closeresults = gda_connection_close (cnc,&error);
+
+ if (!closeresults) {
+ g_print("Connection close reported an error: %s\n",
+ error && error->message ? error->message : "No detail");
+ g_object_unref (cnc);
+ exit (-1);
+ }
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]