Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have received following error while submitting form in local.
SQL
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.

/AboutUsInput.asp, line 102

i am inserting date using
MM_editCmdA.Parameters.Append MM_editCmdA.CreateParameter("param8", 202, 1, 255, Date())

My system datetime format details is
‎August ‎17, ‎2012
7:40:50 PM
time zone--(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi
Format:English(United States)

this works properly in other machines.
Posted
Updated 17-Aug-12 10:47am
v3
Comments
Maciej Los 17-Aug-12 18:02pm    
Before "INSERT" section add SET DATEFORMAT ymd; command and see the result.
More on MSDN: DATEFORMAT

1 solution

So what is different ? You're saying it blows up on a different client machine with the same SQL Server ? Then your date format must be different somehow.

However, the fact you call date() means you're getting the date on the server. I don't see how this could work today on some machines and not others. I think you must mean that it works on different SQL servers. In which case, the issue has to be with your date format in SQL Server, or on the target machine itself.
 
Share this answer
 
Comments
Ritesh Rana 17-Aug-12 12:53pm    
yes..client machines are different but has a common sql server on windows server 2008..
Christian Graus 17-Aug-12 13:15pm    
Then the data coming in has to be different, and causing the issue.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900