password in ODBC connection inclues ";"

Posted on 2013-06-07
Last Modified: 2013-07-22
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;"
Question by:HemlockPrinters
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39230895
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?

Expert Comment

ID: 39231103
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


Expert Comment

ID: 39231189
Have you tried double quotes around the password parameter?
 sConn = "ODBC;DSN=mysql;UID=username ;PWD=\"AB9O]]8y;y\";DATABASE=mydatabase;"
Windows running painfully slow? Try these tips..

Stay away from Speed Up Computer Programs that do more harm than good.
Try these tips instead.
Step by step instructions in trouble shooting Windows Performance issues.


Accepted Solution

HemlockPrinters earned 0 total points
ID: 39245404
thanks, but i still can't get it work.
I just changed the password not to include ";"

Expert Comment

ID: 39245438
Lol there must be a way to do that!

Author Closing Comment

ID: 39345499
there is no other good solutions

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question