[libgda/LIBGDA_5.0] Corrected example



commit 50bc421d09f54dfd7831b91d7ce2180dcd401a44
Author: Vivien Malerba <malerba gnome-db org>
Date:   Thu Mar 29 22:30:43 2012 +0200

    Corrected example
    
    set the GdaSataSelect::auto-reset property

 libgda-ui/demos/linked_model_param.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgda-ui/demos/linked_model_param.c b/libgda-ui/demos/linked_model_param.c
index 5c02943..3a76f6f 100644
--- a/libgda-ui/demos/linked_model_param.c
+++ b/libgda-ui/demos/linked_model_param.c
@@ -68,12 +68,12 @@ do_linked_model_param (GtkWidget *do_widget)
 						"SELECT c.id, c.name, s.name AS \"SalesRep\""
 						"FROM customers c "
 						"LEFT JOIN salesrep s ON (s.id=c.default_served_by) "
-						"WHERE s.id = ##SalesRep::gint::null "
-						    "OR s.id IS NULL", NULL, NULL);
+						"WHERE s.id = ##SalesRep::gint::null", NULL, NULL);
 		gda_statement_get_parameters (stmt, &params, NULL);
 		cust_model = gda_connection_statement_execute_select_full (demo_cnc, stmt, params,
 									   GDA_STATEMENT_MODEL_ALLOW_NOPARAM,
 									   NULL, NULL);
+		g_object_set (cust_model, "auto-reset", TRUE, NULL);
 		g_object_unref (stmt);
 
 		/* restrict the c.default_served_by field in the grid to be within the sr_model */



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