DataLengthRec

Purpose
This property is used to determine the length of data in a specified record.

Syntax (Read-Only Property)
Long = object.DataLengthRec(Index)

Parameters
Index (Long)  

This is the record number of the record you want to work with.

This parameter is zero-based (the first record is record number zero).


Return Value
Long (Long)   This is the length of the data in the specified record.

Notes
If the specified record exists, then the length of the data in the specified record is returned as a long.

If the specified record does not exist, the function returns a zero (0)

Error Values
This property does not change the state of the ErrorNumber property.

Example
Objective: Add a record to the database and return its length.

'Create a database
Dim CDP As rtCDP.rtCompactDataPak
Set CDP = New
rtCDP.rtCompactDataPak
'Add a record to the database
CDP.Append "Band", "Journey"
'Get the length of the new record's data
Dim DataLen As Long
DataLen = CDP.DataLengthRec(0) 'DataLen equals 7
'Now get the length of a non-existent record
DataLen = CDP.DataLengthRec(1) 'DataLen equals 0
'Now get the length of a non-existent record
DataLen = CDP.DataLengthRec(-1) 'DataLen equals 0

Version History
1.0 2/1/2001 Tested

See Also
DataLength, DataLengthArray