The Application object is the top object in the Stonefield Query object model. A reference to this object is passed to every event and data object script so the script can interact with Stonefield Query as necessary. User-defined scripts can access the Application object through the built-in SQApplication object. Through the Application object, a script has access to every other object in the object model.

Properties

NameData TypeDescription
ApplicationDataDirectoryStringThe path for Stonefield Query's data files, such as the users and roles tables.
ApplicationDirectoryStringThe path for the Stonefield Query program files.
ApplicationNameStringThe name assigned to the Stonefield Query project. This is the value specified in the Application Name configuration setting.
CalledFromProxyBooleanTrue if Stonefield Query is being run from the SQProxy object, False if not. This allows your scripts to use different behavior, such as not displaying dialogs, in that case.
CanEditReportsBooleanTrue if the user can add or edit reports, False if not.
DashboardChartIntegerThe chart number being generated when a dashboard is previewed and 0 otherwise. This allows a script such as DataEngine.BeforeResultSetRetrieved to do different things for different charts such as prompting for values for the first one.
DataEngineObjectA reference to the DataEngine object.
ParametersObjectA reference to the Parameters collection.
ProjectDirectoryStringThe path for the open project's configuration files.
ReportsDirectoryStringThe path for the reports files.
ReportEngineObjectA reference to the ReportEngine object.
SerialNumberStringThe serial number for the current license.
ShortApplicationNameStringThe abbreviated name assigned to the Stonefield Query project. This is the value specified in the Short Application Name configuration setting.
TargetApplicationDirectoryStringThe target application's program directory. This value is blank if the Need Target Application Directory configuration setting is False.
TimeZoneDescStringContains the descriptive name of the local time zone.
TimeZoneOffsetIntegerContains the offset for the local time zone from GMT in seconds (it even accounts for daylight saving time). This can be used to display local time from fields containing GMT time.
UsersObjectA reference to the Users collection.
VersionStringThe Stonefield Query version number.

Methods

NameDescription
AddPropertyAdds a property to the Application object.
CreateObjectCreates an instance of the specified class.
DecryptDecrypts a string.
EncryptEncrypts a string.
ExecuteExecutes an application.
GetDataSetFieldNameReturns the name of a field as it appears in the data set for a report.
GetINIValueReads a value from the specified INI file.
GetRegistryValueReads a value from the Windows Registry.
GetValuesCollectionReturns a values collection object.
LogLogs a message to the diagnostic file.
OpenFormOpens an instance of the specified form.
PromptUserForValueAsks the user for a value.
RegisterCursorToCloseAfterRunRegisters a cursor to be closed at the end of a report run.
SetINIValueWrites a value to the specified INI file.
SetRegistryValueSaves a value in the Windows Registry.
SetViewerLicensesSets the number of viewer licenses available.
ShowErrorMessageDisplays an error message, similar to the MESSAGEBOX() function.
ShowStatusDisplays a message in the Reports Explorer status bar.
ShutdownTerminates the Stonefield Query session.
UpdateProgressBarUpdates the value of the progress bar in the Reports Explorer status bar.