db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: Setting a field to NULL - how?
Date Mon, 01 Dec 2003 21:58:14 GMT
Graham Leggett wrote:

> I have a table "note" with a row containing a Date. I would like to 
> set the date to null, where previously it had a non null value.
>
> I tried to do this:
>
> note.setEffectiveDate(null);
> note.save();
>
> but the above code has no effect - the date remains set in the 
> database to it's previous value.
>
> Can anyone explain to me what I am doing wrong?

My guess is that you are using MySQL.  If I recall correctly MySQL 
initialises Date fields for you in an attempt to be helpful.  I don't 
think it does this for all of the date formats - you will need to check 
the MySQL documentation.

Scott

-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au





---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message