Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Posts
    11

    Unanswered: Link to Oracle view thru Access 97

    Hello,

    I am having trouble refreshing the link to an Oracle view from Access 97. I refresh the links to the tables successfully, but not the view - I just get a long wait and a generic "ODBC Error" message. I have included the relevant code below. (I have tried the refresh of the view with and without the "SourceTableName" parameter and get the same error).

    Thanks for any help you can give me. The code is below:

    Dim strCon As String
    Dim tdf As DAO.TableDef

    strCon = "ODBC;Driver={Oracle ODBC Driver};DBQ=" & gRossRM_Server & ";Server=" & gRossRM_Server & ";Uid=" & gRossRM_UID & ";Pwd=" & gRossRM_PWD & ";"

    For Each tdf In db.TableDefs
    If tdf.Name = "RossRM_GGC_V_ARTS_ROSS_ORDERS" Then 'the view
    tdf.Connect = strCon & "SourceTableName=FIN_TEST.GGC_V_ARTS_ROSS_ORDE RS"
    tdf.RefreshLink
    Else
    tdf.Connect = strCon
    tdf.RefreshLink
    End If
    Next tdf

  2. #2
    Join Date
    Feb 2008
    Posts
    11

    Found a workaround

    Everyone,

    If anyone thinks they know the answer, please post it. But don't work too hard, I have a workaround. I am just going to delete/rebuild that particular link in my code. That seems to work fine.

    Thanks.

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    There's this bit of code which creates/refreshes a link to SQL Server tables. Perhaps you could modify it for Oracle tables. http://www.dbforums.com/showpost.php...3&postcount=22
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  4. #4
    Join Date
    Feb 2008
    Posts
    11

    re: Code for SQL tables

    Thanks, but my code works fine for Oracle tables. It just doesn't work for the view.

    Another interesting piece of information: my code stores the login/password in the connection string for the tables but not for the view.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •