Question : Password characters breaking SQL statement

I allow any character in a password on a website, but what is happening is that my SQL statement is having problems validating because some characters are interpreted as commands:

select UserID from tblUser where username='chris' and password='111{H}-tzD4<UIQw'

This statement does not find the record, I if I remove the {} characters, it works.  Is there a way to tell SQL servers to take all characters literally? (except single quotes of cource)  If not, what other method is useful?

Answer : Password characters breaking SQL statement

Nine times out of ten these problems are due to lack of coordination between client writes and server reads and vice versa. For instance, because of streams blocking, your program will lock up if it tries to read when nothing has been written nor will be.

I suggest you go through your code with a fine toothed comb for this sort of problem
Random Solutions  
 
programming4us programming4us