Inserting special character

Results 1 to 3 of 3

Thread: Inserting special character

  1. #1
    Join Date
    Dec 1969

    Default Inserting special character

    When I try to insert the character &#039 into my Access db with asp it gives me an errorr message. Is there any way to make Access accept the character, or maybe strip/replace this char before inserting it in the database ?<BR><BR>Thanks alot<BR><BR>Espen

  2. #2
    Delirium Guest

    Default RE: Inserting special character

    when you are trying to insert the &#039 access will think this is the end/beggining of a string.<BR><BR>the best thing to do is remove the character from the string all together: NewString = replace(OldString,"&#039","") this shall replace the &#039 with nothing effectively removing it.<BR><BR>If you have to write the &#039 to the database try replacing it with a different character maybe a slash / : NewString = replace(OldString,"&#039","/") then write this new string to the database and when your read from the database and you wish to display the &#039 then just replace / with &#039<BR><BR>hope it makes sense,<BR>so basically this text : O&#039niel<BR>would be saved in the database like this : O/niel<BR>and then when you want to display the data you will just have to replace the slash with a &#039.<BR><BR>Delirium

  3. #3
    Join Date
    Dec 1969

    Default Thanks alot

    It worked great. I replaced the &#039 with a `<BR><BR>This looks almost the same.<BR><BR><BR>Espen

Posting Permissions

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