-
DBEngine.RegisterDatabase failing
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
-
..." 'PWD=password;
Passwords are case sensitive in 11g.
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb
-
DBEngine.RegisterDatabase failing
The refresh links is working.
If I comment out the:
DBEngine.RegisterDatabase "Dev_database", "Oracle in OraClient11g_home1", True, "Description=" & "Dev_database" & Chr(13) & "Server=" & "SERVERNAME"
It works. But, I do not get my ODBC-DSN created. It is not added to the registry.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|