VBA ADO and Azure Sql server

nd0911

Board Regular
Joined
Jan 1, 2014
Messages
136
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:

Some videos you may like

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Watch MrExcel Video

Forum statistics

Threads
1,109,435
Messages
5,528,746
Members
409,833
Latest member
tdnhan

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top