Results 1 to 3 of 3
  1. #1
    jerem is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    88

    ODBC Call Failed

    Hi
    I have a connection issue. My Ms Access 2010 database is made of linked table to SQL Azure. I have tested the connection string with the following code and it works well:
    Code:
    Dim qdf As DAO.QueryDef, rst As DAO.Recordset
    Dim strResults As String
        Set qdf = CurrentDb.CreateQueryDef("")
        qdf.Connect = DLookup("ConnectionString", "tblConnections", "Active = True")
        qdf.SQL = "SELECT * FROM dbo.tblOutlet"
        qdf.ReturnsRecords = True
        Set rst = qdf.OpenRecordset
        Do Until rst.EOF
            strResults = strResults & rst!ID & vbCrLf
            rst.MoveNext
        Loop
        Debug.Print strResults
        rst.Close
    Set rst = Nothing
    Set qdf = Nothing
    Then I use another code that usually works well on other SQL servers but here I'm getting the error mentioned in the title at td.RefreshLink
    Code:
    Dim db As Database
    Dim td As TableDef
     Dim strConnect As String
        strConnect = DLookup("ConnectionString", "tblConnections", "Active = True")
        Set db = CurrentDb
        For Each td In db.TableDefs
            If InStr(td.Connect, "ODBC") Then
                td.Connect = strConnect
                td.RefreshLink
            End If
        Next

    Here is the connection string:


    Code:
    ODBC;Driver=SQL Server;Server=tcp:/SERVER/,1433;Database=/DATABASE/;Uid=/USER/;Pwd=/PASWWORD/;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;
    Can anyone help?
    Thank you

  2. #2
    jerem is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    88
    The solution is to use Native Client. Solution cross-posted here:
    http://www.utteraccess.com/forum/ind...=2037903&st=20

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

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

Similar Threads

  1. Replies: 1
    Last Post: 03-02-2015, 09:44 AM
  2. ODBC-Call Failed
    By gviau in forum SQL Server
    Replies: 1
    Last Post: 07-05-2014, 10:25 AM
  3. ODBC -- Call Failed error
    By Coffee in forum Access
    Replies: 3
    Last Post: 07-08-2011, 10:34 AM
  4. ODBC--call failed
    By TCB in forum Access
    Replies: 4
    Last Post: 04-28-2011, 08:23 AM
  5. ODBC -- call failed. | Oracle ODBC
    By drdexter33 in forum Access
    Replies: 1
    Last Post: 04-03-2010, 09:32 PM

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