roywijmans
asked on
Date field to NULL using rdoQuery
How can I set a date field in a table to 'NULL' using the rdoQuery object? If I set the rdoParameter value to NULL I get an error!
ASKER
I use Visual Basic 5 and simply setting the rdoParameter to NULL doesn't work. What I want is just setting the field to NULL and the field does allow null values
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I made a mistake, I can update using rdoQuery but not with the connection designer! If I execute a store-proc like a method.
I don't know the answer to your question since I've never worked with RDO, but... I would try one (all) of the following:
- if you pass a query then use the 'null' word (doesn't sound likely)
- if it is a property of an object, try setting it to 'nothing' in VB or else the equivilent in your language
- otherwise... set it to the standard 'null' value of datetimes (I think it's Jan 01 1790 or something)
- or... is it possible that the field doesn't allow nulls (so you need to use Jan 01 if you can't re-create your table to allow nulls)
(Hope this helped, I'd send this as a comment, but if its right I don't think I'd get points...?)
Jim