Monday, March 26, 2012

strings in db question.

i am letting people enter a name into a textbox, then I store it in a string and
store the string in my sql database.

I noticed that I get an error when someone enters a string with a ' in it.
I'm going to test for that, and possibly make a special case to handle that
character.

are there any other characters that i need to watch out for?Depending upon the settings, you might need to guard against " (quote) as well.

The better solution is to use parameters.This article shows you how.

0 comments:

Post a Comment