|
-
Aug 18th, 2005, 08:58 AM
#1
Thread Starter
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|