]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed the GetDataSource() function so the DsDesc that is returned is the full description
authorGeorge Tasker <gtasker@allenbrook.com>
Thu, 27 Jan 2000 11:44:09 +0000 (11:44 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Thu, 27 Jan 2000 11:44:09 +0000 (11:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/db.cpp

index 4617ff18d765f4adfd03e3da299960bbef02cafb..0a6ab1db6ed40b9d54c1ff7b8edb466e3a2e16fd 100644 (file)
@@ -2612,12 +2612,12 @@ 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
+               DsDesc[cb2+1] = 0;  // Set the terminating character for the string
                return(TRUE);
        }
        else