How to update datetime field with NULL using ADO update 
Author Message
 How to update datetime field with NULL using ADO update

I have a routine which enumarates thru all controls on the form updating
values in the table. Problem is with smalldatetime and datetime fields, when
I try to use:

    db1.Fields("LeaseDate").Value = vbNull

or

    db1.Fields("LeaseDate").Value = vbEmpty

I am not getting <NULL> emtry in the table. How it should be done?

Thanks
jr



Wed, 02 Feb 2005 02:41:30 GMT  
 How to update datetime field with NULL using ADO update
Have you tried db1.Fields("LeaseDate").Value=NULL ?

--
Patrick Logan, MCSD
Opinions expressed are my own and not necessarily those of my employer.


Quote:
> I have a routine which enumarates thru all controls on the form updating
> values in the table. Problem is with smalldatetime and datetime fields,
when
> I try to use:

>     db1.Fields("LeaseDate").Value = vbNull

> or

>     db1.Fields("LeaseDate").Value = vbEmpty

> I am not getting <NULL> emtry in the table. How it should be done?

> Thanks
> jr



Wed, 02 Feb 2005 02:49:21 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ADO Problem Updating number field to Null

2. Using--After Update-- to update field in table.

3. 2nd SQL Server update after update text field corrupts row - using RDO

4. Updating data to a memo field using SQL UPDATE

5. Using Update to update an Access field

6. Controlling Updates in ADO using timestamp/update criteria

7. Updating a SQLSever datetime field from VB

8. Updating SQL Server 7 datetime field from VB 6

9. Updating Memo Fields in MS Access using ADO Parameter / Stored Procedures

10. Problem updating field using ADO

11. Updating Memo Fields in MS Access using ADO Parameter / Stored Procedures

12. how to update a Numeric field in a table using VB6 ADO

 

 
Powered by phpBB® Forum Software