[GRASS-SVN] r52708 - grass/branches/releasebranch_6_4/lib/db/dbmi_client

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 17 06:34:19 PDT 2012


Author: mmetz
Date: 2012-08-17 06:34:18 -0700 (Fri, 17 Aug 2012)
New Revision: 52708

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

Modified: grass/branches/releasebranch_6_4/lib/db/dbmi_client/select.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/db/dbmi_client/select.c	2012-08-17 13:31:15 UTC (rev 52707)
+++ grass/branches/releasebranch_6_4/lib/db/dbmi_client/select.c	2012-08-17 13:34:18 UTC (rev 52708)
@@ -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