Link to home
Start Free TrialLog in
Avatar of HemlockPrinters
HemlockPrinters

asked on

password in ODBC connection inclues ";"

I have a problem to connect to mysql database using ODBC and found that the password is
AB9O]]8y;y which include ";"

How can I write password in the connection string correctly?

Here is the connectin string

sConn = "ODBC;DSN=mysql;UID=username ;PWD=AB9O]]8y;y;  DATABASE=mydatabase;"
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

What programming language and why don't you click on "Request Attention" and get this put in the MySQL zone if that is the database you're using?
How about putting the password in a string variable first, then putting that in the connection string:

sPass = "AB9O]]8y;y"
sConn = "ODBC;DSN=mysql;UID=username ;PWD=" & sPass & "; DATABASE=mydatabase;"

Open in new window

Have you tried double quotes around the password parameter?
 sConn = "ODBC;DSN=mysql;UID=username ;PWD=\"AB9O]]8y;y\";DATABASE=mydatabase;"
ASKER CERTIFIED SOLUTION
Avatar of HemlockPrinters
HemlockPrinters

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Lol there must be a way to do that!
Avatar of HemlockPrinters
HemlockPrinters

ASKER

there is no other good solutions