You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Description

Returns the number of rows in a native table.

Syntax

rowcount = Get.RecCount (filevar, status, forcecount)

Parameters

The Get.RecCount function has the following parameters.

ParameterDescription
filevarThe file variable for the source file.
StatusSuccess flag.
forcecountA true or false value. If true, an explicit record count is performed.

Get.RecCount returns the number of records in the file if it was able to access the file. Otherwise, 0 is returned in status.

Example

/* this code fragment
Declare Function Get.RecCount
Count = 0
filename = "CUSTOMERS"
Open filename To filevar Then
    count = Get.RecCount (filevar, flag, 0)
    If flag Else
      /* unable to invoke Get.RecCount() - handle error */
    End
End
Return Count
  • No labels