views:

61

answers:

2

How do I build a connection string which includes a passsword having a "=" in it? (I'm connecting to MySql 5.1)

For example, let's say the password is "Ge5f8z=6", what would the connection string look like?

I tried:

Server=DBSERV;Database=mydb;UID=myuser;PWD="Ge5f8z=6";

and

Server=DBSERV;Database=mydb;UID=myuser;PWD=Ge5f8z=6;"

Both don't work.

+5  A: 

Use two == signs.

So it would be

  Server=DBSERV;Database=mydb;UID=myuser;PWD=Ge5f8z==6;"
Nix
+2  A: 

Precede it with another =, so Ge5f8z==6 should work

Source http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(VS.71).aspx

CResults