VBA ADO and Azure Sql server

nd0911

Board Regular
Joined
Jan 1, 2014
Messages
166
Hello,

first I want to say that, I'm very new with Azure and Sql server.
second, I have an VBA ADO code with a simple select query from an Azure SQL SERVER db.

On my main PC (the PC with my SSMS that i use to contacat the sql server) the code works perfect, but on any other PC (I used the same file in the same IP newwork) I get an error message: "Micosoft ODBC driver manager - Data source name not found and no default driver specified"

I thought that this is an IP rule so i added in the azure portal a firewall rule with 0.0.0.0 to 255.255.255.255 just to test and still no luck.
this is the connection string I'm useing in my ADO, maybe this is the problem ?

Code:
[COLOR=#2B91AF]
[/COLOR]Private Function GetSqlServerConnectionString() As String
GetSqlServerConnectionString = "Driver={SQL Server Native Client 11.0};" _
                            & "Server=tcp:xxxxxxxx.database.windows.net,1433;" _
                            & "Database=xxxxx;" _
                            & "Uid=xxxxxxx;" _
                            & "Pwd={xxxxxxxx};" _
                            & "Encrypt=yes;" _
                            & "Connection Timeout=30;"
End Function
[COLOR=#2B91AF]
[/COLOR]


Does anyone have any idea about this issue ?

thank you !!
 
Last edited:

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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