]> git.saurik.com Git - wxWidgets.git/commitdiff
[SF#851487] wxDb::Catalog() function was attempting to determine if the table that...
authorGeorge Tasker <gtasker@allenbrook.com>
Wed, 12 May 2004 16:49:49 +0000 (16:49 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Wed, 12 May 2004 16:49:49 +0000 (16:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/db.cpp

index cb2fb2e9aff7402e3db7ac973f14a8eae9c3c21b..eb9137aa42ff3b1f2a23e470bc22ee68c68c5a4b 100644 (file)
@@ -3210,6 +3210,13 @@ bool wxDb::Catalog(const wxChar *userID, const wxString &fileName)
         if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO)
             break;
 
+        GetData(3,SQL_C_CHAR,  (UCHAR *) tblName,     DB_MAX_TABLE_NAME_LEN+1, &cb);
+        GetData(4,SQL_C_CHAR,  (UCHAR *) colName,     DB_MAX_COLUMN_NAME_LEN+1,&cb);
+        GetData(5,SQL_C_SSHORT,(UCHAR *)&sqlDataType, 0,                       &cb);
+        GetData(6,SQL_C_CHAR,  (UCHAR *) typeName,    sizeof(typeName),        &cb);
+        GetData(7,SQL_C_SLONG, (UCHAR *)&precision,   0,                       &cb);
+        GetData(8,SQL_C_SLONG, (UCHAR *)&length,      0,                       &cb);
+
         if (wxStrcmp(tblName, tblNameSave.c_str()))
         {
             if (cnt)
@@ -3230,13 +3237,6 @@ bool wxDb::Catalog(const wxChar *userID, const wxString &fileName)
             tblNameSave = tblName;
         }
 
-      GetData(3,SQL_C_CHAR,  (UCHAR *) tblName,     DB_MAX_TABLE_NAME_LEN+1, &cb);
-      GetData(4,SQL_C_CHAR,  (UCHAR *) colName,     DB_MAX_COLUMN_NAME_LEN+1,&cb);
-      GetData(5,SQL_C_SSHORT,(UCHAR *)&sqlDataType, 0,                       &cb);
-      GetData(6,SQL_C_CHAR,  (UCHAR *) typeName,    sizeof(typeName),        &cb);
-      GetData(7,SQL_C_SLONG, (UCHAR *)&precision,   0,                       &cb);
-      GetData(8,SQL_C_SLONG, (UCHAR *)&length,      0,                       &cb);
-
         outStr.Printf(wxT("%-32s %-32s (%04d)%-15s %9ld %9ld\n"),
             tblName, colName, sqlDataType, typeName, precision, length);
         if (wxFputs(outStr.c_str(), fp) == EOF)