Article ID: 168837 - Last Review: October 11, 2006 - Revision: 2.4 PRB: Error 3162 Setting FoxPro Date Field to Null
This article was previously published under Q168837 On This PageSYMPTOMS
Trying to set a Visual FoxPro Date field to Null via DAO/ODBC results in
the following error:
"Run-time error '3162':
Null Is Invalid." CAUSE
The FoxPro ODBC driver does not use Null for an empty date.
RESOLUTION
Set the date field to 12/30/1899 instead. The Visual FoxPro ODBC driver
translates this value into an empty date.
STATUS
This behavior is by design.
MORE INFORMATION
In Visual Basic and other VBA and DAO applications, dates are stored as the
number of days since 12/30/1899. This date is stored internally as the
number 0. The Visual FoxPro ODBC driver takes this 0 value to represent an
empty date.
Steps to Reproduce Behavior
APPLIES TO
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations |






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top
