Line breaks in mysql and c# .net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • keiranvv
    New Member
    • Nov 2008
    • 3

    #1

    Line breaks in mysql and c# .net

    Hi, I'm currently writing a c# application and I'm using a multiline textbox to save the address of a person. When the query is generated, the line breaks are shown as a "\r\n" escape sequence. However when the query is executed the lines breaks disappear. Any suggestions? Thanks a lot
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    I don't understand this part of your description "When the query is generated, the line breaks are shown as a "\r\n" escape sequence. However when the query is executed the lines breaks disappear". When are the line breaks seen and when are they not seen?

    Comment

    • keiranvv
      New Member
      • Nov 2008
      • 3

      #3
      for example: While I'm debugging the code, I can stop it after its created the query but before it executes it, so before it executes it looks like this "insert into tbl_example values(1, "test", "123 road\r\nsuburb" );" but after the statement is executed and I look at the database table, it shows that address as "123roadsuburb" . Hope that makes it clearer.

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        What do you use to look in the database? What's the output of a select from that data like?

        Comment

        • keiranvv
          New Member
          • Nov 2008
          • 3

          #5
          Originally posted by r035198x
          What do you use to look in the database? What's the output of a select from that data like?
          I'm using navicat, and if i run a select statement on that data it comes out: "1, test, 123 roadsuburb"

          Comment

          Working...