Access connection to SQL issue

  • We have an Access application that tries to go to SQL via a linked table.  When we first try to run the report in question we get Connectoni Failed, SQL Server does not exist or access denied.

    The ODBC connection tested fine.

    If I go to the Tables section of Access, and click on the linked table, I see the data just fine.  After having done that, the report works fine.

    Any ideas for how to fix or a workaround?

    Thanks!

  • Have you tried opening the connection via coding first? I use this to establish the connections when I first open the database:

    objConn.Open strConn, strUID, strPwd

    For Each tbl In CurrentDb.TableDefs

    If Len(tbl.Connect) > 0 Then

    'Connect and refresh link

    tbl.Connect = strConn & ";UID=" & strUID & ";PWD=" & strPwd

    tbl.RefreshLink

    End If

    Next

  • Not sure what they have tried since I am not the developer of it.  But interrestingly enough that is what I told them to do

  • When the tables were linked, was the "Save password" box checked"? I had the same problem happen to me until I deleted them and re-created the links.

     

    Sandi

  • I think it was.  Should it not be?

  • Yes, it should be. I just wanted to make sure it was....

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply