INSERTing Line Breaks into MySQL DB using ASP

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default INSERTing Line Breaks into MySQL DB using ASP

    Hi All

    Could you please let me know how my ASP page can insert 1 row of data
    containing line breaks into a MySQL DB.

    To explain, I'm using ASP Classic > MyODBC 3.5x (Win) > MySQL 4 (Win) and my
    insert command is:
    INSERT INTO `WEBCONTENT` (CONTENTTEXT) VALUES ('Order Number: [ORDERNUM]

    Account Number: [ACCOUNTCODE

    Invoice Address:

    [INVADDRESS]

    Tax Code: [TAXCODE]

    Delivery Address:

    [DELADDRESS]

    Goods Ordered:

    [GOODS]

    ');

    When I retrieve this row data all of the line breaks have disappeared.
    NOTE: I do have a replace function that replaces any vbCrLf's with <BR> to
    make it appear correctly on my ASP page, but I still get no line breaks.

    I've queried the data using SQLyog and all my linebreaks are showing as
    square boxes.

    When I had my row data in an Access DB the above worked fine.

    Do I have to format the data in someway before inserting it into the db?

    Thanks

    Robbie




    Astra Guest

  2. Similar Questions and Discussions

    1. PHP deletes .swf line breaks
      Hi all - I have a designed a Flash based interface to send email via PHP. I capture the variables in Flash using: var my_lv:LoadVars=new...
    2. cfmail line breaks
      I'm sending text only email via cfmail. I don't seem to have much control over line breaks. Code is: <cfmail ....> (type not specified) Name:...
    3. Respecting line breaks?
      Hi all, I'm try to make a forum, in which people can add messages to a discussion. I use a textarea for input and store this text in a database....
    4. In correct line breaks in ID2.0J
      Our company produces manuals in several different European languages and as most of the operators are Japanese we use a Japanese version of ID. The...
    5. Line Breaks (DB APP)
      What server model are you using? ASP? PHP? CF? -- Dave ----------------------------------------------------------------- If I were half as...
  3. #2

    Default Re: INSERTing Line Breaks into MySQL DB using ASP

    Hi Guys

    You're probably not that interested anyway [ ;0) ] , but I did manage to
    find out how to get round this.

    I was doing a replace() for vbCrLf, but MySQL must only use vbLf because as
    soon as I changed my replace function to this everything was OK.

    Rgds

    Robbie



    "Astra" <info@NoEmail.com> wrote in message news:40c98197$1_4@127.0.0.1...
    Hi All

    Could you please let me know how my ASP page can insert 1 row of data
    containing line breaks into a MySQL DB.

    To explain, I'm using ASP Classic > MyODBC 3.5x (Win) > MySQL 4 (Win) and my
    insert command is:
    INSERT INTO `WEBCONTENT` (CONTENTTEXT) VALUES ('Order Number: [ORDERNUM]

    Account Number: [ACCOUNTCODE

    Invoice Address:

    [INVADDRESS]

    Tax Code: [TAXCODE]

    Delivery Address:

    [DELADDRESS]

    Goods Ordered:

    [GOODS]

    ');

    When I retrieve this row data all of the line breaks have disappeared.
    NOTE: I do have a replace function that replaces any vbCrLf's with <BR> to
    make it appear correctly on my ASP page, but I still get no line breaks.

    I've queried the data using SQLyog and all my linebreaks are showing as
    square boxes.

    When I had my row data in an Access DB the above worked fine.

    Do I have to format the data in someway before inserting it into the db?

    Thanks

    Robbie





    Astra Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139