Including Data from an Oracle Database into a Mongoose Application

Mongoose-based applications can communicate with Oracle databases through the IDO layer. To set up communication, use these steps:

If you want to link to a non-Unicode database, use the Process Defaults form to set the process default for Non Unicode Literal. This ensures that the database indexes are scanned and accessed properly when performing queries.

See Built-in process defaults.

  1. In the Outrigger Profiles form, create a profile for the Oracle database. Set the Database Type to Oracle, and specify the Oracle user, password, and data source to use when linking to the database. The data source represents the Oracle service name as defined in the tnsnames.ora file.
  2. In the IDO Linked Databases form, create a new linked database record with these values:
    Link Database
    Specify the name that is to identify the database in Mongoose. This is a Mongoose internal designation only and need not be the same as the actual database name.
    Database Type
    Specify Oracle.
    Profile Name
    Specify the profile created in step 1.
  3. In the Tables grid, specify an existing table name in the Oracle database.
  4. Save the table record, which enables the buttons on the form.
  5. Select the table and click Columns. This opens the IDO Linked Tables form, with a Columns grid.
  6. Click Repopulate to connect to the Oracle database and create the default column information for your new table.
  7. Click Create View to create a new Mongoose view that defines the necessary columns and data types. The Mongoose view includes the columns from the linked table, along with these columns and values:
    • "RecordDate", used for optimistic locking
    • "RowPointer", required to be a value that is unique for the entire table
    • "AddMongooseFields", with a literal value of 1, which is used internally
  8. Use the New IDO Wizard to create an IDO over your new table. The profile name is automatically populated.

Notes about the process:

  • The profile that is stored with an IDO definition is used to make an ApplicationDB object within the IDO layer for read and write operations on the table, as well as for method calls to that database.
  • As an alternative to building an IDO through the wizard, which allows basic read-write functionality to the Oracle database, you can use IDORuntime.Context.CreateOutriggerApplicationDB in a custom program to provide direct access to the outrigger database.

    See Example: Custom Code to Communicate with an Outrigger Database for a code sample that uses this assembly.

  • The standard Oracle client DLLs are required on the Mongoose utility server. Non-direct mode is used for communications.
  • Asynchronous event handlers cannot be used when communicating with Oracle databases.
  • User-defined fields cannot be used when communicating with Oracle databases.
  • All Oracle tables referenced in an IDO must exist in the same Oracle database
  • RowPointer and RecordDate properties are used by Mongoose but do not exist in Oracle tables, so those IDO properties are derived instead of pointing to base table columns.
  • A called Oracle IDO method must be a function with a return type of integer.
Related topics