Excel connection string to mysql database

david meehan 1 Reputation point
2021-05-27T16:06:46.033+00:00

HI

I'm looking for some VB to help me change a connection string based on inputs to certain cells on a worksheet.

I have the below connection string in a pivot table. Rather than having the user and password hard-coded- I want to get them to insert on sheets1 row1 name, then row 2 password

I then want the connection string to change with these new inputs

DRIVER={MySQL ODBC 5.3 ANSI Driver};UID= name from Row1;PWD={pW from row 2};SERVER={xx-app-xx.xx.iefcloud.com};DATABASE=name of database;PORT=3306;

I used to have code that did this for a conn to a MS SQL DB- but doesn't seem to work to Mysql db.

Any help would be appreciated

Thanks

David

Developer technologies Visual Basic for Applications
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.