Try OpenEdge Now
skip to main content
Programming Interfaces
Data Management : ABL API for Multi-tenant and Table Partition Management : Maintaining multi-tenant and table partition entities : Tables (reading and updating)
 
Tables (reading and updating)
The API provides access to tables for multi-tenant purposes using the ITable interface. The only writeable property is the IsMultitenant property, and then only when the table is not yet enabled for multi-tenancy.
The service returns tables that can be multi-tenant enabled and accessed with ABL code. The service does not expose the (hidden) schema tables in the Data Dictionary and tables that only can be accessed from SQL.
The following example shows how to enable a table for multi-tenancy:
define variable table as ITable no-undo.

table = service:GetTable("Customer").
table:IsMultitenant = true.
service:UpdateTable(table).
It is also possible to retrieve a collection of tables in the database from the service and then update the multi-tenant related properties in the instances on the ITableSet collection before passing the collection to the service to commit all changes in a single transaction.
For more information on the:
*ITable entity interface, see ITable interface3
*ITableSet entity collection interface, see ITableSetinterface