I have again this evening attempted to port across my web application to my
clients server (the SQL stuff)...
I now have all the tables and views and sp's set up...
I ran the application and I am currently getting an error :
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data
type to a datetime data type resulted in an out-of-range datetime value.
What I dont understand is why this works FINE without error on my server
with SQL Server 2000 and SP3 installed (same as the hosting company)....and
even last night on SQL Server 7 SP2 it got passed this area!!!
The ASP code causing the error is this line :
SQLInsert = "UPDATE tblLogon "
SQLInsert = SQLInsert & "Set InvalidAttempts = '0', DateLastLoggedIn = '" &
Year(Date) & "-" & Month(Date) & "-" & Day(Date) & " " & Time & "' "
SQLInsert = SQLInsert & "WHERE UserID = '" & Session("UserID") & "'"
Which produces the following SQL Statement :
UPDATE tblLogon Set InvalidAttempts = '0', DateLastLoggedIn = '2003-3-17
19:47:16' WHERE UserID = '1'
I have had LOADS of problems with date fields previously - but was reassured
that by entering the date in that format (yyyy-mm-dd) you avoid such
Can anyone shed any light on this? I was supposed to be spending the night
working on another section of the project but find myself now going round in
circles with stuff that previously worked :(
Thanks in advance for any/all help,