Linking tables from other access database and not to save the login information I have used the storelogin = false in the code but after the procedure executed and the tables are linked in the current database the password can be found in the Connect column of MSysObjects for the tables linked. The code is below, cant find what's going wrong here.Thanks
Code:
Dim db_ext1Gb As DAO.Database
Set db_ext1Gb = DBEngine.OpenDatabase(srcPath & "\" & "ext1Gb.accdb", False, False, ";pwd=" & strPassword)
For Each tdf In db_ext1Gb.TableDefs 'Loop through all the table in the external database
If Left(tdf.Name, 4) <> "MSys" Then 'Exclude System Tables
On Error Resume Next
DoCmd.TransferDatabase acLink, "Microsoft Access", srcPath & "\" & "ext1Gb.accdb", acTable, tdf.Name, tdf.Name, , False
TableDefs.Append tdf
tdf.RefreshLink
End If
Next tdf
db_ext1Gb.Close