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
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?
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
Set db = Nothing
Private Function isTemp(ByVal strName As String)
isTemp = Left(strName, 7) = "~TMPCLP"
Where xxx xis the username and yyyy is the password.
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...
Anyone ave this sloved this problem?