Hi all,
I have linked tables in Access to a SQL-server with SQL authentication.
For some reason I'm not promted to login after I run this code:
==========================
gStrConnect = "ODBC;DRIVER={SQL SERVER};SERVER=MyServer;Database=MyDb;UID=" & Me.strUserId & ";PWD=" & Me.strPassword
For Each Tdf In db.TableDefs
If InStr(1, Tdf.Connect, "MyDb") > 0 Then
With Tdf
.Connect = gStrConnect
.RefreshLink
End With
End If
Next
====================
If I delete all linked tables and link them again then I'm promted to login again. It seems to me that the connect string is stored somewhere.
What do I have to do so that I'm always promed to login?
Kent J.
I have linked tables in Access to a SQL-server with SQL authentication.
For some reason I'm not promted to login after I run this code:
==========================
gStrConnect = "ODBC;DRIVER={SQL SERVER};SERVER=MyServer;Database=MyDb;UID=" & Me.strUserId & ";PWD=" & Me.strPassword
For Each Tdf In db.TableDefs
If InStr(1, Tdf.Connect, "MyDb") > 0 Then
With Tdf
.Connect = gStrConnect
.RefreshLink
End With
End If
Next
====================
If I delete all linked tables and link them again then I'm promted to login again. It seems to me that the connect string is stored somewhere.
What do I have to do so that I'm always promed to login?
Kent J.