[GRASS-SVN] r52709 - grass/branches/develbranch_6/lib/db/dbmi_client

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 17 06:35:09 PDT 2012


Author: mmetz
Date: 2012-08-17 06:35:08 -0700 (Fri, 17 Aug 2012)
New Revision: 52709

Modified:
   grass/branches/develbranch_6/lib/db/dbmi_client/select.c
Log:
dblib: fix sql string usage

Modified: grass/branches/develbranch_6/lib/db/dbmi_client/select.c
===================================================================
--- grass/branches/develbranch_6/lib/db/dbmi_client/select.c	2012-08-17 13:34:18 UTC (rev 52708)
+++ grass/branches/develbranch_6/lib/db/dbmi_client/select.c	2012-08-17 13:35:08 UTC (rev 52709)
@@ -132,7 +132,7 @@
     G_debug(3, "  SQL: %s", buf);
 
     db_init_string(&stmt);
-    db_append_string(&stmt, buf);
+    db_set_string(&stmt, buf);
 
     if (db_open_select_cursor(driver, &stmt, &cursor, DB_SEQUENTIAL) != DB_OK)
 	return (-1);
@@ -221,7 +221,7 @@
     G_zero(val, sizeof(dbValue));
     sprintf(buf, "SELECT %s FROM %s WHERE %s = %d\n", col, tab, key, id);
     db_init_string(&stmt);
-    db_append_string(&stmt, buf);
+    db_set_string(&stmt, buf);
 
     if (db_open_select_cursor(driver, &stmt, &cursor, DB_SEQUENTIAL) != DB_OK)
 	return (-1);



More information about the grass-commit mailing list