SQL server with german regional settings

后端 未结 1 951
天命终不由人
天命终不由人 2020-12-22 11:34

We have a database application that has been running for months, then suddenly it started to give errors.

I noticed a datetime float calculation exception that which

相关标签:
1条回答
  • 2020-12-22 12:29

    Control panel.. regional settings.

    This sounds like a client app issue too, not SQL Server. If they are installed on the same box, SQL Server does not take settings from the OS locale.

    It could be that the user of the app has german locale and some data is being passed as string, when it should be float or datetime already (with client doing locale handling)

    SQL Server will also never recognise "0,05" auf Deutsch too.

    SET LANGUAGE GERMAN
    
    DECLARE @val float
    SET @val = 0,05 --fail
    GO
    DECLARE @dt datetime
    SET @dt = '23 Mrz 2009' --fail
    GO
    DECLARE @dt datetime
    SET @dt = '23.03.2009' --ok
    GO
    

    And "servername\instance,portNumber" is correct for SQL Server.

    0 讨论(0)
提交回复
热议问题