Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to clear a Date or Time Field with VBSCRIPT

Status
Not open for further replies.

fortage

MIS
Jun 15, 2000
329
US
W2k/ASP, vbscript
I'm writing a sql update command to erase or remove the current date value in an Access 2000 table. I've tried setting it to '' or null but null doesn't change the current value and ''(blank string) errors out.
What can I do?
I also posted in the Access forum.
 
do you have a default value for the date field defined in your table and/or is it defined as a required field?

could you also post your sql update statement so we could see if there's any errors in that?
 
Here is my query
objConn.CommandText = "UPDATE tblTickets SET TicketStatus = '" & request.form("ListChangeStatus") & "', CloseDate = Null, CloseTime = Null, CloseUserName = '' WHERE TicketNo = " & Request.QueryString("TicketNo")

The CloseTime field in Access is "long time" with no default and not required.
The CloseTime field does not change with this query.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top