L
LarryP
I have an Access 2000 database linked to an Oracle table, but the first time
in each session that I make use of the linked table, I get asked for the
password. I figured refreshing the link and providing the password from code
at startup would solve that, but I'm apparently not coding it correctly.
Code follows; the tdfLinked.Connect line generates runtime error 3420,
"Object invalid or no longer set." I don't do this kind of thing often, and
don't have the foggiest idea what's causing the error or how to fix it. Any
help most welcome.
Sub RefreshLinkX()
Dim tdfLinked As Object
Set tdfLinked = CurrentDb.TableDefs("RMSDW_MAPL_MASTER")
tdfLinked.Connect =
"ODBC;DATABASE=RMSDW_MAPL_MASTER;UID=RMSDW_RO;PWD=xxxxxxxx;DSN=RMSDW_RO"
tdfLinked.RefreshLink
End Sub
in each session that I make use of the linked table, I get asked for the
password. I figured refreshing the link and providing the password from code
at startup would solve that, but I'm apparently not coding it correctly.
Code follows; the tdfLinked.Connect line generates runtime error 3420,
"Object invalid or no longer set." I don't do this kind of thing often, and
don't have the foggiest idea what's causing the error or how to fix it. Any
help most welcome.
Sub RefreshLinkX()
Dim tdfLinked As Object
Set tdfLinked = CurrentDb.TableDefs("RMSDW_MAPL_MASTER")
tdfLinked.Connect =
"ODBC;DATABASE=RMSDW_MAPL_MASTER;UID=RMSDW_RO;PWD=xxxxxxxx;DSN=RMSDW_RO"
tdfLinked.RefreshLink
End Sub