[thelist] ASP - SQL Date Time Help
Anthony Baratta
Anthony at Baratta.com
Wed Aug 4 12:21:10 CDT 2004
At 08:50 AM 8/4/2004, Michael Pack wrote:
>I keep getting the following error when I run the transaction without
>selecting an end date in the form:
>
>Microsoft OLE DB Provider for SQL Server (0x80040E07)
>The conversion of a char data type to a datetime data type resulted in
>an out-of-range datetime value.
>
>I've done a response.Write for the string and it is empty.
Empty <> Null
You need to explicitly set your field value to null or not include it in
the list of columns being inserted or updated.
e.g.
INSERT ....
'value1','value2',NULL,'value4'
UPDATE ...
col1 = NULL
Hope that helps.
--
Anthony Baratta
Liberty not only means that the individual
has both the opportunity and the burden of
choice; it also means that he must bear the
consequences of his actions.... Liberty and
responsibility are inseparable.
- Friedrich A. Hayek
Nobel Prize Winner,
The Constitution of Liberty, 1960 (1899-1992)
More information about the thelist
mailing list