Try OpenEdge Now
skip to main content
Programming Interfaces
Database Administration Entity Interface Reference : ISchema interface : ISchema examples
 

ISchema examples

The following code allocates new table partitions for the schema changes loaded from the myschema.df file:
define variable definitions as ISchema   no-undo.
define variable area        as IArea     no-undo.
define variable iterator    as IIterator no-undo.

definitions = service:GetSchemaChanges("myschema.df").
definitions:LoadOptions:ForceIndexDeactivation = true.
service:UpdateSchemaChanges(definitions).
iterator = definitions:Partitions:Iterator("ObjectType = 'table'").
do while iterator:HasNext():
  cast(iterator:Next(),IPartition):Allocate().
end.
  
service:UpdateSchema(definitions).
See also:
*API entities and entity service methods
*IDataAdminElementinterface
*IPartitionCollectioninterface
*Schema(reading, loading, and updating)