Solved

Excel Macro mySql Open Connection syntax

Posted on 2006-11-09
2
1,148 Views
Last Modified: 2008-01-09
I currently use:
   cnn.Open "DSN=myodbc3-test"
which works well until some other program modifies the default content of the DSN.

I want to specify the domain, db, user, pswd. Please help me with syntax. Thanks.

I got this syntax, but how do I specify the domain/IP?
cnn.Open "Provider=myodbc3-test;Data Source=v2_db;User Id=v2_user;Password=mypswd;"

thanks
0
Comment
Question by:spoowiz
2 Comments
 

Accepted Solution

by:
jschnei555 earned 250 total points
ID: 17917155
Can you just use someting like this instead?  

"DRIVER={MySQL ODBC 3.51 Driver};SERVER=data.domain.com;PORT=3306;DATABASE=myDatabase; USER=myUsername;PASSWORD=myPassword;OPTION=3;"
0
 

Author Comment

by:spoowiz
ID: 17919741
Works. Thanks.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: dandraka
There are several quick shortcuts that can make your life easier in Microsoft Programs.  These simple tips and tricks will your work more productive and you faster at completing your tasks! MS Word (1) Creating Re-usable Scraps You can create s…
Introduction It seems that at least a couple of times per month, I answer a question that requires automating Outlook from another Microsoft Office application, usually (although not always) to send one or more email messages.  For example: …
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now