Results 1 to 5 of 5
  1. #1
    Join Date
    May 2002

    Question Unanswered: Access, Dsn, sql and password

    Hi to all...
    I have a problem with sql.
    I have an application and a separate database in access and i need to convert the database to sql.
    Now the application uses linked tables to access at the database.
    I have upsized the db to sql, maked the dsn connection and linked the tables.
    The problem is that every first time that I access to the server sql, asks me the password for the logon.
    Is possible to remove this request?

    Thanks in advance and... sorry for my bad english :-S

  2. #2
    Join Date
    May 2002
    Sorry, I have resolved searching for other similar posts...
    Thank to all!!!

  3. #3
    Join Date
    Nov 2003

    Do you have the link to the old (useful) thread?

    Hi, for all of us spending some of our time reading and wanting to help, (and for newcomers of course) it is always nice to see a brief description of how the problem was solved, perhaps with the link to an old posting you found useful. This also keeps this forum more useful as we keep old useful threads alive. Do you have such a link?


  4. #4
    Join Date
    May 2002
    I not have the link (I have found this solution in this forum, with the search), but i can insert the code that I have used to slove the problem, with a litte modify to skip the deleted objects.

    The first thing at the load of the mask:

    And this is the magical function:

    Public Sub UpdateLinkedTables()
    Dim tdfLinked As TableDef, db As Database, strConnect As String
    On Error Resume Next
    Set db = CurrentDb
    For Each tdfLinked In db.TableDefs
    If Not tdfLinked.Connect = "" And Not isTemp(tdfLinked.Name) Then
    strConnect = tdfLinked.Connect
    strConnect = strConnect & ";UID=xxxx;PWD=yyyy"
    tdfLinked.Connect = strConnect
    End If
    Next tdfLinked
    Set db = Nothing
    End Sub

    Private Function isTemp(ByVal strName As String)
    isTemp = Left(strName, 7) = "~TMPCLP"
    End Function

    Where xxx xis the username and yyyy is the password.

    Very thanks who has written this code!!!

  5. #5
    Join Date
    May 2002
    Another problem...

    Now, when the mask load, it run the UpdateLinkedTables to set the user/password for the connection string.
    But the program continue to ask me the user/password when launched. And also if i not insert the correct password the program work correctly.
    This password request is FIRST of the execution of the form load...
    Is possible?
    Anyone ave this sloved this problem?

    Thanks to all!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts