DBEngine.RegisterDatabase failing
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: DBEngine.RegisterDatabase failing

  1. #1
    Join Date
    Apr 2010
    Location
    Indianapolis
    Posts
    10

    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

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,478
    ..." '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

  3. #3
    Join Date
    Apr 2010
    Location
    Indianapolis
    Posts
    10

    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
  •  



Click Here to Expand Forum to Full Width