Runoob Tutorial ArchiveEnglish

ADO Record Object

ADO Record Object


Record Object (ADO version 2.5)

The ADO Record Object is used to hold a row in a recordset, or a file or a directory in the file system.

Versions prior to ADO 2.5 could only access structured databases. In a structured database, every table has the exact same number of columns in every row, and every column is composed of the same data type.

The Record Object allows access to datasets where the number of columns and/or data types differ between rows.

Syntax

objectname.property

objectname.method

Property

Property Description
ActiveConnection Sets or returns the Connection object to which the Record object currently belongs.
Mode Sets or returns the effective permission to modify data in the Record object.
ParentURL The absolute URL of the parent Record.
RecordType Returns the type of the Record object.
Source Sets or returns the src parameter of the Record object's Open method.
State Returns the state of the Record object.

Method

Method Description
Cancel Cancels the execution of a CopyRecord, DeleteRecord, MoveRecord, or Open call.
Close Closes a Record object.
CopyRecord Copy a file or directory to another location.
DeleteRecord Delete a file or directory.
GetChildren Returns a Recordset object, where each row represents a file or subdirectory in the directory.
MoveRecord Move a file or directory to another location.
Open Open an existing Record object or create a new file or directory.

Collection

Collection Description
Properties A collection of specific provider properties.
Fields Contains all Field objects in the Record object.

Properties of the Fields collection

Property Description
Count

Returns the number of items in the fields collection. The default value is 0.

Example:

countfields = rec.Fields.Count
Item(named_item/number)

Returns a specific item in the fields collection.

Example:

itemfields = rec.Fields.Item(1)

or itemfields = rec.Fields.Item("Name") |