From 06322acab7b6253ea3e8a0d5c82bc4c45f210157 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 10 Sep 2006 22:45:02 +0000 Subject: [PATCH] clear values of type SQL_C_DATE/TIME too (patch 1541829) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/dbtable.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/common/dbtable.cpp b/src/common/dbtable.cpp index b453797e52..5463713419 100644 --- a/src/common/dbtable.cpp +++ b/src/common/dbtable.cpp @@ -2244,6 +2244,20 @@ void wxDbTable::ClearMemberVar(UWORD colNumber, bool setToNull) pDt->second = 0; pDt->fraction = 0; break; + case SQL_C_DATE: + DATE_STRUCT *pDtd; + pDtd = (DATE_STRUCT *) colDefs[colNumber].PtrDataObj; + pDtd->year = 0; + pDtd->month = 0; + pDtd->day = 0; + break; + case SQL_C_TIME: + TIME_STRUCT *pDtt; + pDtt = (TIME_STRUCT *) colDefs[colNumber].PtrDataObj; + pDtt->hour = 0; + pDtt->minute = 0; + pDtt->second = 0; + break; } if (setToNull) -- 2.45.2