Solved

Excel Macro mySql Open Connection syntax

Posted on 2006-11-09
2
1,150 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article will show you how to use shortcut menus in the Access run-time environment.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
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…

914 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