]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dbtable.cpp
don't write the strings to the stream one char at a time, it's *horribly* slow
[wxWidgets.git] / src / common / dbtable.cpp
index e11ff656029e1318cb77428e970aa5ddffed0e28..49e2c2348db14234dc13c3314ce11f534fe1c93b 100644 (file)
@@ -528,15 +528,16 @@ bool wxDbTable::bindUpdateParams(void)
 /********** wxDbTable::bindCols() **********/
 bool wxDbTable::bindCols(HSTMT cursor)
 {
+    static SDWORD cb;
+
     // Bind each column of the table to a memory address for fetching data
     UWORD i;
     for (i = 0; i < noCols; i++)
     {
+        cb = colDefs[i].CbValue;
         if (SQLBindCol(cursor, (UWORD)(i+1), colDefs[i].SqlCtype, (UCHAR*) colDefs[i].PtrDataObj,
-                       colDefs[i].SzDataObj, &colDefs[i].CbValue ) != SQL_SUCCESS)
-        {
+                       colDefs[i].SzDataObj, &cb ) != SQL_SUCCESS)
           return (pDb->DispAllErrors(henv, hdbc, cursor));
-        }
     }
 
     // Completed successfully