From: Vadim Zeitlin Date: Mon, 25 Mar 2002 15:11:24 +0000 (+0000) Subject: fixed compilation under Unix where SQL_DATETIME is not defined X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a327b520909bea498517e512ddfdee0a052fe876 fixed compilation under Unix where SQL_DATETIME is not defined git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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;