X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1218415705b9fcb40dedbc38c55632c0c3cb6df..0b8558681e8c69b749f64b891111f5ea72c04550:/src/common/db.cpp diff --git a/src/common/db.cpp b/src/common/db.cpp index 22ea1a380e..5df993b4bf 100644 --- a/src/common/db.cpp +++ b/src/common/db.cpp @@ -44,7 +44,7 @@ #endif //__BORLANDC__ #ifndef WX_PRECOMP - #include + #include "wx/string.h" #endif //WX_PRECOMP #if wxUSE_ODBC @@ -319,7 +319,7 @@ bool wxDB::getDbInfo(void) if (SQLGetInfo(hdbc, SQL_DBMS_NAME, (UCHAR*) dbInf.dbmsName, 40, &cb) != SQL_SUCCESS) return(DispAllErrors(henv, hdbc)); - if (SQLGetInfo(hdbc, SQL_DBMS_VER, (UCHAR*) dbInf.dbmsVer, 20, &cb) != SQL_SUCCESS) + if (SQLGetInfo(hdbc, SQL_DBMS_VER, (UCHAR*) dbInf.dbmsVer, 40, &cb) != SQL_SUCCESS) return(DispAllErrors(henv, hdbc)); if (SQLGetInfo(hdbc, SQL_ACTIVE_CONNECTIONS, (UCHAR*) &dbInf.maxConnections, sizeof(dbInf.maxConnections), &cb) != SQL_SUCCESS) @@ -331,13 +331,13 @@ bool wxDB::getDbInfo(void) if (SQLGetInfo(hdbc, SQL_DRIVER_NAME, (UCHAR*) dbInf.driverName, 40, &cb) != SQL_SUCCESS) return(DispAllErrors(henv, hdbc)); - if (SQLGetInfo(hdbc, SQL_DRIVER_ODBC_VER, (UCHAR*) dbInf.odbcVer, 20, &cb) != SQL_SUCCESS) + if (SQLGetInfo(hdbc, SQL_DRIVER_ODBC_VER, (UCHAR*) dbInf.odbcVer, 60, &cb) == SQL_ERROR) return(DispAllErrors(henv, hdbc)); - if (SQLGetInfo(hdbc, SQL_ODBC_VER, (UCHAR*) dbInf.drvMgrOdbcVer, 20, &cb) != SQL_SUCCESS) + if (SQLGetInfo(hdbc, SQL_ODBC_VER, (UCHAR*) dbInf.drvMgrOdbcVer, 60, &cb) == SQL_ERROR) return(DispAllErrors(henv, hdbc)); - if (SQLGetInfo(hdbc, SQL_DRIVER_VER, (UCHAR*) dbInf.driverVer, 40, &cb) != SQL_SUCCESS) + if (SQLGetInfo(hdbc, SQL_DRIVER_VER, (UCHAR*) dbInf.driverVer, 60, &cb) == SQL_ERROR) return(DispAllErrors(henv, hdbc)); if (SQLGetInfo(hdbc, SQL_ODBC_API_CONFORMANCE, (UCHAR*) &dbInf.apiConfLvl, sizeof(dbInf.apiConfLvl), &cb) != SQL_SUCCESS)