Purpose
This property is used to determine the length of data in a specified
record.
Syntax (Read-Only Property)
Long
= object.DataLength(Key)
| Key
(String) |
|
This
is the key of the record you want to work with. |
| Long
(Long) |
|
This
is the length of the data in the specified record. |
Notes
If
a record with the specified key exists: (1)
The length of the data in the specified record is returned as a long.
(2) The ErrorNumber
property remains unchanged.
If
a record with the specified key does not exist: (1)
Function returns a zero (0). (2) The ErrorNumber
property remains unchanged.
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.DataLength("Band")
'DataLen
equals 7
'Now
get the length of a non-existent record
DataLen
= CDP.DataLength("Artist") 'DataLen
equals 0
Version
History
1.0 2/1/2001 Tested
See
Also
DataLengthArray,
DataLengthRec