less than 1 minute to read

The GetLicenseCount method returns the number of activated licenses, either by license type or the total number.

Syntax

pgsql
GetLicenseCount(LicenseType as Integer) as Integer

Parameters
LicenseType
The license type for which the license count is desired. Pass 0 for a count of all licenses, 1 for a count of Report Viewer licenses, and 2 for a count of Report Designer licenses.

Return Value
The number of licenses activated for the specified license type.

Example
This simple example displays the total number of licenses available.

Visual FoxPro

foxpro
lparameters toApplication as SQApplication local lnLicenses lnLicenses = toApplication.Users.GetLicenseCount(0) messagebox('There are ' + transform(lnLicenses) + ' licenses.')

VBScript

function Main(Application)
Licenses = Application.Users.GetLicenseCount(0)
msgbox "There are " + cstr(Licenses) + " licenses."
end function

JavaScript

javascript
function Main(Application) { var Licenses Licenses = Application.Users.GetLicenseCount(0) ; }

C#

csharp
public static void ShowLicenses() { int licenses = sfqApplication.Users.GetLicenseCount(0); MessageBox.Show("There are " + licenses.ToString() + " licenses."); }

VB.NET

public shared function ShowLicenses() as Boolean
  licenses As Integer = sfqApplication.Users.GetLicenseCount(0)
  MessageBox.Show("There are " + licenses.ToString() + " licenses.")
End Function

See also

Users Collection

© Stonefield Software Inc., 2024 • Updated: 06/06/16
Comment or report problem with topic