line breaks lost in sql server

后端 未结 7 1498
心在旅途
心在旅途 2020-12-18 18:02

I am entering error information into an ErrorLog table in my database. I have a utility class to do this:

ErrorHandler.Error(\"Something has broken!!\\n\\nDe         


        
7条回答
  •  春和景丽
    2020-12-18 18:29

    No need to replace string input\output, you need just pick up correct option:

    Tools -> Options...
    
    > Query Results 
      > SQL Server 
        > Results to Grid 
    
    set "Retain CR\LF on copy or save" to true.
    

    And don't forget to restart your management studio!

    according Charles Gagnon answer

提交回复
热议问题