|
sentinel -> Date field insert problem (4/1/2008 10:48:58)
|
Hey all... I have a page with 5 calendar fields on it. Depending on the user he/she should be able to submit any of the dates to the database. The problem I am running into is when a user does not submit all. When that happens my database gives me an error such as the one below. It changes depending on what field was left blank. Database Results Error Description: [MySQL][ODBC 3.51 Driver][mysqld-5.0.51a-community-nt]Incorrect date value: '' for column 'Vacation1' at row 1 Number: -2147467259 (0x80004005) Source: Microsoft OLE DB Provider for ODBC Drivers I added code to the top of the submit page to show you what values are being passed. StartVacation:2008-03-01 EndVacation:2008-07-01 Vacation1: Vacation2: Vacation3: vacation:vacation Submit1:submit My database is MySQL 5.0 community and the fields are all set to DATE. This is my SQL code from my insert page. INSERT INTO vacation2 (StartVacation,EndVacation,Vacation1,Vacation2,Vacation3,UserID,DateEntered) VALUES ('" & request.form("StartVacation") & "','" & request.form("EndVacation") & "','" & request.form("Vacation1") & "','" & request.form("Vacation2") & "','" & request.form("Vacation3") & "', '" & user & "',curdate()) Any help is greatly appreciated! Thank you
|
|
|
|