Results 1 to 3 of 3

Thread: [2005] apostrophe handler

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2007
    Posts
    617

    [2005] apostrophe handler

    what is the efficient way to handle apostrophe (') when working with SQL Transact command.

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724

    Re: [2005] apostrophe handler

    Escape it using double apostrophe's:
    Code:
    myString = myString.Replace("'", "''");

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] apostrophe handler

    Use parameterized queries so that the apostrophes are automatically handled.

Posting Permissions

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



Click Here to Expand Forum to Full Width