X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e25cdb868f00e6a3d05c994f6fddacf4f24e5350..a536e411022b21280532c9daadc806a437fbb4c6:/src/common/db.cpp?ds=sidebyside diff --git a/src/common/db.cpp b/src/common/db.cpp index 86dd614ad9..15160d5951 100644 --- a/src/common/db.cpp +++ b/src/common/db.cpp @@ -722,13 +722,17 @@ bool wxDb::Open(const wxString &Dsn, const wxString &Uid, const wxString &AuthSt { if (!getDataTypeInfo(SQL_DATE,typeInfDate)) { - if (!getDataTypeInfo(SQL_DATETIME,typeInfDate)) +#ifdef SQL_DATETIME + if (getDataTypeInfo(SQL_DATETIME,typeInfDate)) + { + typeInfDate.FsqlType = SQL_TIME; + } + else +#endif // SQL_DATETIME defined { if (failOnDataTypeUnsupported) return(FALSE); } - else - typeInfDate.FsqlType = SQL_TIME; } else typeInfDate.FsqlType = SQL_DATE;