Results 1 to 17 of 17

Thread: Saving apostraphy to sql table (resolved)

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2003
    Posts
    683

    Resolved Saving apostraphy to sql table (resolved)

    Gonna keep this simple. Got a textbox and a button. CLick on button, insert text into sql table. Now add a apostraphy into text and error occurs, obviously its the apostraphy in the sql syntax.

    The .net cmdtext is
    "Insert into testtable (testtext) values ( '" & txtTestTextbox.Text & "')"

    So if the text is Hello I get a cmdtext of
    "Insert into testtable (testtext) values ( 'Hello')"

    Now with text of I Don't Know I get a cmdtext of
    "Insert into testtable (testtext) values ( 'I Don't Know ')"

    even I can see the problem but how do we work around this?
    Last edited by Beast777; Aug 18th, 2005 at 01:10 PM.

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