]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/db.cpp
Line drawing correction.
[wxWidgets.git] / src / common / db.cpp
index 6f0219a901b4899d45068c07aae855b5ce4957f1..e0bcf041b1de713fa9e7a3d674374fd11b14bc70 100644 (file)
@@ -1995,7 +1995,6 @@ wxDbInf *wxDB::GetCatalog(char *userID)
 {
        wxDbInf *pDbInf = NULL; // Array of catalog entries
        int      noTab = 0;     // Counter while filling table entries
-       int      i = 0;
        int      pass;
        RETCODE  retcode;
        SDWORD   cb;
@@ -2613,12 +2612,14 @@ bool GetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD DsDes
  * description upon return
  */
 {
-       SWORD cb;
+       SWORD cb1,cb2;
 
-       if (SQLDataSources(henv, direction, (UCHAR FAR *) Dsn, DsnMax, &cb,
-                                                        (UCHAR FAR *) DsDesc, DsDescMax, &cb) == SQL_SUCCESS)
+       if (SQLDataSources(henv, direction, (UCHAR FAR *) Dsn, DsnMax, &cb1,
+                                                        (UCHAR FAR *) DsDesc, DsDescMax, &cb2) == SQL_SUCCESS)
        {
-               DsDesc[cb+1] = 0;  // Set the terminating character for the string
+#ifndef _IODBC_
+         DsDesc[cb2+1] = 0;  // Set the terminating character for the string
+#endif
                return(TRUE);
        }
        else