CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Location
    RSA
    Posts
    16

    Unhappy Problem Submitting info to a database when it has an apostaphe " ' "

    I am having a problem when submitting data from a text box into a database. The problem comes in when I use an apostarphe. Can anyone help in how to overcome this problem.

    My thought is to search the data for the apostraphe and replace it with a Chr(??) and then submit it. How do I do this, if it is the correct method of doing so.

    Any help is greatly appreciated.

    Thanks

  2. #2
    Join Date
    Feb 2003
    Posts
    21

    Wink Try it !!!

    Hi,

    u could prevent error by just adding one more apostrope.

    For eg: if you want to store the value "hello it's me",
    then you should give in your code as "hello it'' me".

    If you are using text box to type the value, then replace single apostrope character by two apostrope characters.

    Regards,
    Chandramohan J.

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

Featured