4.7 (3)
Rating
(2)
(1)
(0)
(0)
(0)

FAQ-Wiki-SQL Server

There has been an error converting into datetime format while importing scripts into SQL SERVER 2000

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.

Answer:

It means that you should change the server language settings by doing the following:

  1. Start Enterprise Manager.
  2. Select the necessary server and connect to it.
  3. Open its properties window by clicking the right mouse button on it and selecting Properties.
  4. Open the Server Settings tab.
  5. Select English in the Default Language for user dropdown list and press OK.
  6. Stop SQL server. To do that, select Stop in the context menu and answer Yes to the question Are you sure you wish to stop SQL Server service. in the confirmation window.
  7. Start SQL Server. To do that, select Start in the context menu.
  8. Now you can run scripts saved on your hard drive by Recovery Toolbox for SQL Server. You can also run the program in the database scripts execution mode.
  9. Now you need to restore the settings. To do that, open the properties window of the necessary server in Enterprise Manager.
  10. Select the default language in the Default Language for user list and press OK.
  11. Stop SQL server. To do that, select Stop in the context menu and answer Yes to the question Are you sure you wish to stop SQL Server service. in the confirmation window.
  12. Start SQL Server. To do that, select Start in the context menu.