If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > How to Null a Date Field

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-18-04, 19:30
joeacunzo joeacunzo is offline
Registered User
 
Join Date: Mar 2004
Posts: 1
Question How to Null a Date Field

I'm writing some code in VB that uses ADO through the ODBC driver for Timberline/Pervasive and I'm trying to figure out how to null a date field. I've tried various values such as an empty string, Null, even the zero value for a COleDateTime object (which is "12/30/1899 12:00:00 AM"); none of which work. They all result in either "Invalid field format" or "Type mismatch" errors.

How do you set a date field to Null in Pervasive?

Thanks,
Joe A.
Reply With Quote
  #2 (permalink)  
Old 03-18-04, 20:44
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
Null should work. YOu might try the Insert statement outside of the VB app. Use the COntrol Center. If it works there, it'll work in the VB app. You might also verify that the field really is a Date.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On