Results 1 to 3 of 3
  1. #1
    nd0911 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    31

    ADO VBA and Azure SQL Server

    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:
    
    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
    
    


    Does anyone have any idea about this issue ?

    thank you !!

  2. #2
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    1,420
    Possibly the connection string - have a read here : https://www.connectionstrings.com/sql-azure/

    Provider=SQLNCLI11;Password=myPassword;User ID=[username]@[servername];
    Initial Catalog
    =databasename;Data Source=tcp:[servername].database.windows.net;
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    nd0911 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    31
    Thank you for your answer.

    I tried to change my connection string with yours but still the same issue, its working only with one PC.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Migrating back end to Azure effectively
    By theviking in forum Access
    Replies: 5
    Last Post: 02-27-2019, 03:51 PM
  2. Replies: 3
    Last Post: 02-11-2016, 02:56 PM
  3. General discussion for MySQL, PHP, Azure
    By MrRuz in forum General Chat
    Replies: 2
    Last Post: 10-29-2014, 02:06 AM
  4. Access 2010 and SQL Azure
    By drexasaurus in forum SQL Server
    Replies: 2
    Last Post: 09-20-2012, 08:58 AM
  5. Access 2010 to SQL Azure migration
    By Aurelius7 in forum SQL Server
    Replies: 6
    Last Post: 06-18-2012, 10:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums