Salesforce

DbRecs (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

DbRecs (Magic xpa 3.x)

Returns the number of records in a database's data source.

Syntax:

DbRecs(number,file name)

Parameters:

number: A number that represents the data source's sequence number in the Data repository.

file name: This parameter is used as an alternative to number. If not needed, enter '' (two single quotation marks). If needed, enter an Alpha string that represents the file name. The string may contain a path. If the path is not indicated, Magic xpa assumes the current directory.

Returns:

Number (0 if empty)

Example:

DbRecs(1,'') or DbRecs('1'DSOURCE,'') returns the number of records contained in the first data source of the Data repository.

DbRecs(1,'FSTFIL.DAT') returns the number of records in the FSTFIL.DAT file in the current directory.

Note:

  • Using the DSOURCE literal will ensure that the correct data source will be counted even if the table's position in the Data repository has changed. The data source sequence number and path behave exactly as defined in the Data repository.

  • In XML sources, if the XML is currently opened, the function will return the record count in the flat-view; otherwise, the function will return 0.

Exceptions:

This function is not supported for Web Service databases.

See also:

DbDel, DbExist, DbSize

How Do I Determine the Bulk Size When Fetching Records from a Database Table?

The Online and Rich Client Samples projects (program SQ11 and RSQ11)

Reference
Attachment 
Attachment