INSET NULL in the db field

Results 1 to 2 of 2

Thread: INSET NULL in the db field

  1. #1
    Join Date
    Dec 1969

    Default INSET NULL in the db field

    I have a date field on a registration system that is set to NULL by default. Once a date is entered for the user it is entirely possible that the date will need to be reset to NULL after a certain time period. I would really like to keep a datetime field in the SQL database so I am trying to reset the field to NULL via an update statement<BR><BR>If not isDate(myDate) then<BR> myDate = "NULL"<BR>End If<BR><BR>INSERT INTO DB (DateField) VALUES(myDate)<BR><BR>But this does not work. Instead it resets everything to<BR>"1/1/1900". <BR><BR>So how can I set a variable to NULL and INSERT it in to the database?<BR><BR>Thanks,<BR><BR>mo<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: INSET NULL in the db field

    By putting quotes around the word Null, you are sending the word null to thwe database, NOT a Null value. Try without the quotes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts