dbCardinality

Top  Previous  Next

Syntax

INT = dbCardinality(pConnection as POINTER,tableName as STRING)

Description

Returns the cardinality of a table. The count of the number of rows..

Parameters

pConnection - Database pointer returned by dbConnect or dbConnectDSN.

tableName - Name of the table to retrieve cardinality.

Return value

The count of all rows in the table or 0 if no rows exist..

Remarks

dbCardinality is an expensive function to use in respect to time and resources. It should be used sparingly with the result saved for future use.

Example usage

FOR temp = EACH pTables as STRING
    PRINT #temp
    PRINT "Cardinality:",dbCardinality(pdb,#temp)
NEXT