Try OpenEdge Now
skip to main content
Programming Interfaces
Database Administration Entity Interface Reference : IArea interface : IArea examples : Creating areas
 
Creating areas
The following code shows assignment of properties and extents for a new area. There need to be at least one extent in the area before it can be passed to the service to be created.
The ClusterSize and RecordsPerBlock properties both defaults to 64 and does not need be assigned even if they are mandatory:
define variable area   as IArea no-undo.
define variable extent as IExtent no-undo.

assign
  area = service:NewArea("OrderDataArea")
  area:ClusterSize = 8
  area:RecordsPerBlock = 32
  extent = service:NewExtent()
  extent:Size = 1024
  extent:Path = "C:\db").

area:Extents:Add(extent).

service:CreateArea(area).