When read this property returns the total count of the records in the
stream. They are calculated over the current stream size, the size of the record
(calculated by the filter) and the beginning of the stream - as
set in the filter (see the SFFIlter.StreamBegin).
When written the property sets the stream size to the number of records specified
(SFFIlter.StreamBegin takes effect also). Therefore setting RecordCount to a number less
than the current actual record count will truncate the stream. Respectively
to a greater value will extend the stream.
Can be called only if the record has been previously bound to a stream.
variable = record_object.RecordCount
record_object.RecordCount = variable
variable - numeric (long integer) - the number of records in the stream.
Set rec = Server.CreateObject("newObjects.utilctls.SFRecord")
Set main = Server.CreateObject("newObjects.utilctls.SFMain")
Set file = main.OpenFile("Somefile.bin")
rec.AddField "FirstName", vbString, 20
rec.AddField "LastName", vbString, 20
Response.Write "The file contains " & rec.RecordCount & " records"
The RecordCount property gets/sets the number of the records in the stream calculated
over the stream size without the reserved part of the stream. The reserved part of the
stream is the first n bytes - as specified in the SFFilter's StreamBegin property. Its
default value is 0 therefore by default the Record count is the stream_size/record_size.
Pay attention to the SFFilter's role - depending on the filter and its settings the
size (i.e. the physical size of the record in the stream) will be different - for example
the strings may be saved/read as ANSI or UNICODE and this will result
in different physical representations.
Applies to: SFRecord object
See also: SFFilter
Windows 95/NT and later
Windows CE 3.0 and later
Pocket PC/Windows Mobile 2003 and later
Windows CE.NET 4 and later