Stuck on ADODB.connection MySQL

drognanar

New Member
Joined
Feb 2, 2018
Messages
4
Hi,
I am completely stuck on this one, any help will be appreciated.

I have a code which is supposed to do inserts/updates in database. I have connected to database using both (one commented out):
Code:
Sub SQLConnection()


    Dim oConn As ADODB.Connection
    Set oConn = New ADODB.Connection
    
    oConn.Open "fullfilepath\RSReports.dsn", "MyUserId", "MyPassword"
    'oConn.Open "Driver={MySQL ODBC 5.3 Unicode Driver};Server=myserver.com;User=MyUserId;Password=MyPassword;sslca={filepath\ca.pem};sslcert={filepath\cert.pem};sslkey={filepath\key.pem};sslverify=1;Option=3;"

End sub

SSL encryptions are included in dsn, as well as in later connection string. Update/Insert worked without an issue for myself. However a moment someone else is accessing excel and tries to run same code they get RunTime error saying "Data source name not found and no default driver specified".

Once again any help appreciated
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
There's always an easy explanation.. Thanks! I'd be still looking into code and trying to rewrite connection string
 
Upvote 0

Forum statistics

Threads
1,212,933
Messages
6,110,752
Members
448,295
Latest member
Uzair Tahir Khan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top