ADO » Objects » Record

Version: 2.5

The ADO Record object can contain a row from a Recordset object, or a directory or file from a file system.

Prior to the introduction of the Record object, only structured databases could be accessed by ADO. In a structured database, each table has the exact same number of columns (fields) in each row (record), and each column is composed of the same data type. In other words, the structure of every row in the database is the same. The Record object expands the usefulness of ADO by allowing access to sets of data where the number of columns and/or the data type can vary from row to row. For example, it can handle sets of data that are in a tree-like structure composed of a root with nodes and leaves.

The fields associated with the Record object can be viewed by using the Fields Collection.

Properties

ActiveConnection

Syntax: variant or string = recordobject.ActiveConnection

Sets or returns a variant value defining the Connection object to which the Record object belongs (or a string value if there is no connection).

Mode

Syntax: ConnectModeEnum = recordobject.Mode
recordobject.Mode = ConnectModeEnum

Sets or returns the provider access permission (the ConnectModeEnum value) for a Record object.

ParentURL

Syntax: string = recordobject.ParentURL

Returns a string value that is the absolute URL of the record in the Record object.

RecordType

Syntax: RecordTypeEnum = recordobject.RecordType

Returns a RecordTypeEnum that is the type of the Record object.

Source

Syntax: variant = recordobject.Source
recordobject.Source = variant

Returns a variant value that is the source parameter of the Open method of the Record object.

State

Syntax: long = recordobject.State

Returns a long value describing if the Record object is open or closed.

Methods

Cancel

Syntax: recordobject.Cancel

Cancels the execution of a pending CopyRecord, DeleteRecord, MoveRecord, or Open call.

Close

Syntax: recordobject.Close

Closes a Record object.

CopyRecord

Syntax: CopyRecord Source, Destination, UserName, Password, Options, Async

Copies a file, or a directory and its contents, to a specified location.

DeleteRecord

Syntax: recordobject.DeleteRecord Source, Async

Deletes a file, or a directory and all of its contents.After such a delete, you need to close the Record object.

GetChildren

Syntax: Set recordsetobject = recordobject.GetChildren

Returns a Recordset object where each row represents a file or directory.

MoveRecord

Syntax: MoveRecord Source, Destination, UserName, Password, Options, Async

Moves a file, or a directory and its contents, to a specified location.

Open

Syntax: recordobject.Open Source, ActiveConnection, Mode, CreateOptions, Options, UserName, Password

Used to open an existing Record object, or to create a new file or directory.

Collections

Fields

The Fields Collection is a collection of all of the Field objects associated with a specific Record object.

See Also: