Try OpenEdge Now
skip to main content
Programming Interfaces
Database Administration Entity Interface Reference : IDomain interface : IDomain examples : Creating a new domain
Creating a new domain
The following code shows assignment of properties for a new domain. The Tenant is a mandatory property and has to be defined before the domain can be created:
define variable domain as IDomain no-undo.

     domain = service:NewDomain("AcmeDomain")
  domain:AuthenticationSystem = service:GetAuthenticationSystem("_oeusertable")
  domain:AccessCode  = <user variable>
  domain:Tenant      = service:GetTenant("Acme")
  domain:Description = "This domain is the default domain for Acme.").