COleDateTime null values in Access database 
Author Message
 COleDateTime null values in Access database

I am trying to set a Date/Time value in an Access database using the
COleDateTime class in my recordset.  I have tried setting the
COleDateTime::m_dt to NULL and the COleDateTime::m_status to
COleDateTime::null with no luck.  It keeps storing the value of 0.00 in my
Date/Time object which is interpreted as 12:00 AM.  I don't understand - the
defaults to the fields are null, and when I first read them into my dialog I
see no values in the date controls.  However, as soon as I set a date value,
and later try to delete the value (set it to null), that is when this
stragne behaviour occurs.  Has anybody else had this problem?

--
Kim Croisdale
Alta Genetics Inc.

//Please remove the NOJUNK from my email for replies



Sat, 03 Feb 2001 03:00:00 GMT  
 COleDateTime null values in Access database
I have had this problem myself.  Everything looked good in the date
value up until the field exchange.  I got around it by checking the dialog
value,
and before the update of the database, I called SetFieldValue with the
address
of the field in the recordset.  Not clean but it will work.

Greg



Quote:
> I am trying to set a Date/Time value in an Access database using the
> COleDateTime class in my recordset.  I have tried setting the
> COleDateTime::m_dt to NULL and the COleDateTime::m_status to
> COleDateTime::null with no luck.  It keeps storing the value of 0.00 in
my
> Date/Time object which is interpreted as 12:00 AM.  I don't understand -
the
> defaults to the fields are null, and when I first read them into my
dialog I
> see no values in the date controls.  However, as soon as I set a date
value,
> and later try to delete the value (set it to null), that is when this
> stragne behaviour occurs.  Has anybody else had this problem?

> --
> Kim Croisdale
> Alta Genetics Inc.

> //Please remove the NOJUNK from my email for replies



Fri, 09 Feb 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. COleDateTime null values in Access database

2. COleDateTime and null values

3. Writing a NULL Date to an Access DB using COleDateTime

4. How to return a value from a database query and null datagrids

5. Problems with OLE/DB: GetValue, NULL Values in Database

6. Global pointer is null sometimes even when initialized to some non-null value

7. How to access Custom Database Properties of a Access 97 database programmatically

8. COleDateTime and NULL (writing to DB)

9. How to create a DATE value without COleDateTime

10. COleDateTime Mapping to dialog With no value

11. I need a RFX function to receive/store COleDateTime to Database

12. I need a RFX function to receive/store COleDateTime to Database

 

 
Powered by phpBB® Forum Software