Q:There has been an error converting into datetime format while importing scripts into SQL SERVER 2005
If you see the following error after running your scripts:
Server: Msg 242, Level 16, State 3, Line 1
[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.
The statement has been terminated.
It means that you should change the server language settings by doing the following:
- Start Management Studio.
- Choose the necessary server.
- Go to Security\Logins.
- Choose the user that will be using the database and open the user's properties window.
- Select English in the Default Language for user dropdown list and press OK.
- Now you can run the script saved on your hard drive by SQL Server Recovery Kit. Alternatively, you can start the program in the database scripts execution mode.
- Now you need to restore the settings. To do that, open the properties window of the necessary user Management Studio.
- Select the default language in the Default Language for user list and press OK.