Refresh A2K->Oracle Link

G

Guest

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
 
G

Guest

Larry,

Sorry for the late answer, wasn't around quite a while.

Linking a table into Access :
Choose : Insert - Table - Link Table in the new window select 'Files of
type:' the last entry 'ODBC Databases()' and change to tab 'Machine Data
Source', select the source database, login if necessary, select the needed
tables and in the lower right corner is a field which you can tick :'Save
password'.
That's it.

Regards,
Bernd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top