|Add method. Adds a
previously created field to the record.
record_object - a SFRecord object
field - previously created SFField object.
Set rec = Server.CreateObject("newObjects.utilctls.SFRecord")
Set fld = Server.CreateObject("newObjects.utilctls.SFField")
fld.Type = vbString
fld.Size = 100
fld.Name = "Title"
This adds a text field named "Title" to the record.
In spite of the similarity with ADO recordsets and fields, the
SFRecord and SFField objects are intended for work with any binary
file or stream. DB engines keep the information of the tables into the
DB and thus are able to provide you with fully configured recordset
with fields corresponding to the table columns. In case of binary
stream the file structure is unknown thus your code defines the
record. Also a binary file can be read in more free manner. For
example you can change the record definition at a certain point in the
file and continue to read with it (this will be the case if you are
decoding some file format with headers for example). This makes the
synchronization of the recordset with the stream/file very important. Therefore if
you are using such dynamic structure changes you will need to invoke
the ReBind operation. Fields added
to the record can be configured before adding them or after that, but
rebinding/or initial binding must be invoked before any Move or
Read/Write operation is performed.
s to: SFRecord object
See also: .AddField.
Windows 95/NT and later
Windows CE 3.0 and later
Pocket PC/Windows Mobile 2003 and later
Windows CE.NET 4 and later