ACC2: Attaching ORACLE Public Synonyms (128887)



The information in this article applies to:

  • Microsoft Access 2.0

This article was previously published under Q128887

SUMMARY

ORACLE public synonyms are not listed in the ODBC Attach Table list box in Microsoft Access. To attach ORACLE public synonyms, you must view system tables.

This article assumes that you are familiar with Access Basic and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Access Basic, please refer to the "Building Applications" manual.

MORE INFORMATION

ORACLE public synonyms are contained in the ORACLE Public schema by default. The Public schema contains many system tables (often more than 100). To attach these tables, you must turn on the option to view system tables. To turn on this option, follow these steps:
  1. Open any database.
  2. From the View menu, choose Options.
  3. In the Category box, select General.
  4. In the Items box, set Show System Objects to Yes. You should now be able to attach your ORACLE public synonyms in the Attach Table list box. If you would like to attach objects using code, you can use the following piece of code.

    NOTE: In the following sample code, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this code.
          Function AttachSynonym ()
          DoCmd TransferDatabase a_attach, "<SQL Database>", _
          "ODBC;", a_table,"PUBLIC.TESTSYN1", "Test_Syn"
          End Function
    
       Note that the function attaches a public synonym called TESTSYN1 as
       Test_Synon.
    						

Modification Type:MajorLast Reviewed:11/6/2000
Keywords:kbinfo kbusage KB128887