G
Guest
I'm trying to figure out a general algorithm to allow any valid MS SQL 2000
username/password combination to log into a Winform application. I'm having
trouble with special characters.
I'm created a user named test
The password assigned is test'"; (that is, the word test, followed by a
single quote, followed by a double quote, followed by a semi-colon)
In the connection string, I've tried quoting the password with double quotes
and doubling each double quote in the password. That causes the code to run
fine (no runtime exceptions), but it can't log into the SQL server.
I also tried the above with single quotes instead of double quotes. That
doesn't work either.
If I change the password to test' I can then place double quotes around it,
and it works fine. If I change the password to test" I can plance single
quotes around it and it works fine. But I can't get the combination of both
single and double quotes in a single password to work.
Thanks in advance!
username/password combination to log into a Winform application. I'm having
trouble with special characters.
I'm created a user named test
The password assigned is test'"; (that is, the word test, followed by a
single quote, followed by a double quote, followed by a semi-colon)
In the connection string, I've tried quoting the password with double quotes
and doubling each double quote in the password. That causes the code to run
fine (no runtime exceptions), but it can't log into the SQL server.
I also tried the above with single quotes instead of double quotes. That
doesn't work either.
If I change the password to test' I can then place double quotes around it,
and it works fine. If I change the password to test" I can plance single
quotes around it and it works fine. But I can't get the combination of both
single and double quotes in a single password to work.
Thanks in advance!