Latest Post

iPhone 3.0 bugs

So here are details of two bugs I’ve found so far; In the Camera application in the bottom left corner is (I guess) your latest picture in your Camera Roll except the picture I’m being shown is about 6 pictures ago and not updating. I sync my iPhone to my iMac at home but as is often the...

Read More

SQL – Conversion of char to datetime error

Posted by johnb | Posted in Uncategorized | Posted on 23-05-2008

Tags:

0

Whilst I was deploying a web site yesterday for a client I ran into a problem. After deploying to the client server and them restoring the database to their SQL server, every login resulted in an error whilst trying to insert an audit record of the login.

Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

The error was regarding converting a char to a datetime field. Now this code ran just fine on our servers, we checked everything, from regional settings, locales etc – to cut a long story short it turned out that the SQL user the client had created for us to use had it’s default language set to ‘British English’ instead of ‘English’ – switching it to English it all started working fine – probably not something the majority would run into but posting it here for prosperity

Write a comment