Replace Problems

Results 1 to 2 of 2

Thread: Replace Problems

  1. #1
    JustinS Guest

    Default Replace Problems

    Hey there all,<BR><BR>I am having big problems with commas "," in a string. Here&#039s what is going on -<BR><BR>Page1 - The user enters comments into multiple text boxes<BR>Page2 - Request.forms the var "Comments"<BR><BR>Then I perform the following -<BR><BR>Comments = Replace(Comments, "&#039","&#039&#039")<BR><BR>Which works just fine, but as the information being submitted to the database is in an array if I try and use..<BR><BR>Comments = Replace(Comments, ",",",,") or (Comments, ",","^")Then it breaks the SQL String as all the values for Comments are in an array after using Split().<BR><BR>Any ideas, anyone?<BR><BR>Thanks in advance,<BR><BR>Justin

  2. #2
    Justins Guest

    Default RE: Replace Problems .. Forgot to mention

    Hey all,<BR><BR>The actual _problem_ that the additional , is causing -<BR><BR>The comments are being submitted into an access database and when the additional comma is in the SQLstr the following occurs:<BR><BR>Name &#124 Comments<BR>--------------------------<BR>Justin &#124 hello there,<BR>Joe &#124 Comments this breaks<BR><BR>The original comment was _just_ for Justin&#039s comments (ie "hello there, Comments this breaks") and it has been split in two - everything after the comma gets put in Joe&#039s comments field. This continues depending how many commas are entered. Nasty eh?<BR><BR>Cheers,<BR><BR>Justin

Posting Permissions

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