Use the RuntimePublic API to query data from an external database following this pattern:

  1. Retrieve a DatabaseProvider from the DatabaseAccess instance;
  2. Use the provider to create a transaction;
  3. Use the transaction to create a Command;
  4. Use the Command to create command parameters;
  5. Execute the Command;
  6. Retrieve the Command results.


In this example, we have a external database accessed through a connection called 'Oracle DB Connection' that is defined in the environment management console.

We get records of people with less than 20 years old from the PERSON table in an external Oracle database.



See Also

Overview of RuntimePublic.Db API | About APIs