Salesforce

DbSize (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

DbSize (Magic xpa 4.x)

Returns the size of a database's data source in bytes.

Syntax:

DbSize(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 data source specification. The string may contain a path. If the path is not indicated, Magic xpa assumes the current directory.

Returns:

Number (0 if no file exists)

Examples:

DbSize(1,") or DbSize('1'DSOURCE,") return the number of bytes contained in the first data source of the Data repository. The actual size of the data source on disk may be larger.

DbSize (1,'FSTFIL.DAT') returns the number of bytes contained in the FSTFIL.DAT file in the current directory.

Note:

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

  • In an XML source, if the XML is currently opened, the function will return the record count in the flat-view multiplied by the record length (as with regular tables); otherwise, the function will return 0.

Exceptions:

This function is not supported for Web Service databases.

See also:

DbDel, DbExist, DbRecs

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