Removing the symbols for Carriage Return and Line Feed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LOCAFO
    New Member
    • Aug 2007
    • 6

    Removing the symbols for Carriage Return and Line Feed

    I am using vb.net and have a long string of text. When I use vbnewline or vbCrLf, for a carraige retun, I get a black square box in the SQL database table. I need the carriage return but I don't want the symbol to show up in SQL table because when another application (vb.6) is opened which uses the same SQL dbase table and shows the text, I get the carriage return, but I also get the unwanted symbol |

    What code or command in vb.net can I use that will still give me the carriage return but not put the black box in the sql dbase table?
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    I would guess that your program inserts a "\r\n" as the newline and the vb6 only looks for "\n".
    Just have vb6 remove the "\r" character, or don't insert the "\r" is your vbnet side.

    Comment

    • LOCAFO
      New Member
      • Aug 2007
      • 6

      #3
      I don't understand what you are talking about. Maybe this will better help you understand my dillema. The xml file that I receive has ~ ~. This is where the carriage return/line break should be. Therefor, In my vb.net code, I do the following command. NewValue = Replace(NewValu e.string, m_linebreak, VbCrLf).

      NewValue is the long string of the xml data and m_LineBreak is ~ ~.

      The black square boxes shows up in the database and in vb6, I get the || marks.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        The square boxes ARE the carriage return (\r) and Line Feed (\n), (most?)database s will not show the line breaks in their stored values.
        Why VB6 is being screwy with it I don't know. Seems like there is a very simple way for this not to be a problem.
        Store the values with ~ ~, then when reading the data, change the ~ ~ to the carriage return line feed.

        Comment

        • Roy Hobbs

          #5
          If you are using a textbox go to the properties and make it multiline

          Comment

          Working...