Character substitution

Results 1 to 2 of 2

Thread: Character substitution

  1. #1
    Bill J. Guest

    Default Character substitution

    Greenhorn question here: One of my program routines involves taking an input string and comparing it against a list of existing entries in the database, using <BR><BR>RS.Find "CommentBody = &#039" & RS2("CommentBody") & "&#039"<BR><BR>Problem is, if the input string contains an apostrophe, it gums the whole works up. Is there a VBScript character substitution that I can sub in for apostrophe&#039s before searching the recordset?

  2. #2
    Join Date
    Dec 1969

    Default RE: Character substitution

    use the replace function to replace all single qoute to 2 single qoute like this replace(yourstring,"&#039","&#039&#039")

Posting Permissions

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