WinStudio

CollectionCap Property

Applies To

IWSApplication interface

Definition

Returns or sets an integer value that indicates the maximum number of records to be retrieved when querying a collection.

Get Syntax

Application.CollectionCap

Set Syntax

Application.CollectionCap = integer

Remarks

A value of 0 indicates that there is no limit to the number of records that can be retrieved. A value of -1 indicates that the system default collection cap is to be used.

TIP: You can confirm the return value or that the value has been correctly set using the Settings window (View menu > Settings > Runtime tab).

Examples

The following example displays a message box that tells what the current collection cap is.

Sub Main()
   Dim colCap As String
   colCap = Application.CollectionCap.ToString()
   Application.ShowMessage("The current collection cap is " & colCap & ".")
End Sub

The following example shows how to use this property to set the collection cap programmatically.

Sub Main()
   Application.CollectionCap = 75
End Sub