KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Requiring licenses
PRODUCT: 4D | VERSION: 12 | PLATFORM: Mac & Win
Published On: September 23, 2011
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

The Is License available command will detect whether certain licenses are present. One possible use of this command would be use it in conjunction with the CHANGE LICENSE command to ensure that a particular license has been registered.

Here is a sample method that can be added at startup to ensure that a particular license is in place.

If (Not(Is license available(4D Web License)))

  CONFIRM("This application requires a Web Server license. "\
     "Do you have this license.";"Yes";"No")

  If (OK=1)
    CHANGE LICENSES
  Else
    ALERT("Shutting down")
    QUIT 4D
  End if
End if


Note - This only applies to 4D (standalone), due to the fact that the CHANGE LICENSE command can not be run on 4D Server.