Adding apostrophes into a database

Results 1 to 3 of 3

Thread: Adding apostrophes into a database

  1. #1
    Anthony Lane Guest

    Default Adding apostrophes into a database

    I don&#039t understand why I sometimes get errors when I try to add a word with an apostrophe into a database and other times I don&#039t. In both instances, it is using the same form field being entered into the same DB field. I am using the objRec.Fields = Request.Form("name") method. I have been told that the best way to get around this is to convert any single apostrophe into a double one when entering it and then when reading it back, to remove one of the apostrophes. There must surely be a better way of doing this!<BR><BR>I would appreciate any help<BR><BR>Anthony Lane.

  2. #2
    Join Date
    Dec 1969

    Default RE: Adding apostrophes into a database

    The following article explains why you are having problems and provides a remedy:<BR><BR>How to Deal with Apostrophes in your SQL String<BR><BR><BR>For future reference, you can search the 4Guys article index at:

  3. #3
    Anthony Lane Guest

    Default RE: Adding apostrophes into a database

    This article uses a SQL string to add to the database. From what it says, it appears that the database will only store one of the apostrophes. If i use the double apostrophe method using objRec.Fields..... then a double apostrophe is stored. Is there any way around this or do I have to use the SQL mthod?

Posting Permissions

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