All,

I have a function that used to work in 10g. It would created a DSN if needed and then refresh all the table links from Access to Oracle back-end.

Now, while trying to convert it to 11g, it is failing on the DBEngine.RegisterDatabase section. Any ideas what is different with the
11g? Thanks.


Public Function linkCTSTables()
Dim dbsLocal As DAO.Database
Dim tblLink As DAO.TableDef

Set dbsLocal = CurrentDb()

DBEngine.RegisterDatabase "Dev_database", "Oracle in OraClient11g_home1", True, "Description=" & "Dev_database" & Chr(13) & "Server=" & "SERVERNAME"

With dbsLocal
For Each tblLink In .TableDefs
If (tblLink.Connect <> "") Then
tblLink.Connect = tblLink.Connect & ";UID=usesrname;" 'PWD=password;
tblLink.RefreshLink
End If
Next tblLink
End With
Exit Function
End Function