Storages & Files Remove method
Remove method

Removes a field from the record.

Syntax:

record_object.Remove index

Parameters:

index - String or numeric. Field name or index to remove.

Examples:

Suppose the file contains one type of records up to a certain position and anoter after it.

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
rec.BindTo file
rec.MoveFirst
For I = 1 To 4
  ' Do something, display records etc.
  rec.MoveNext
Next
rec.Remove "FirstName"
rec.ReBind
For I = 1 To 4
  ' Do something, display records etc.
  rec.MoveNext
Next
' 4 records containing first and last name are read and then
' 4 records containing only last name

Remarks:

As in the other cases after changing the record structure/settings ReBind must be called in order to allow the filter to re-calculate the record representation. Of course the modified record can be attached to another stream - by calling BindTo with the other stream as parameter.

Applies to: SFRecord object

See also: BindTo, ReBind

Supported on:

Windows 95/NT and later
Windows CE 3.0 and later
Pocket PC/Windows Mobile 2003 and later
Windows CE.NET 4 and later

 

newObjects Copyright 2001-2006 newObjects [ ]