Record Object
Represents a row in a Recordset, or a file or directory in a file system.
Remarks
You can view the fields associated with the Record object by way of the Fields collection on the Record object. ADO allows object-valued columns including Recordset, SafeArray, and scalar values in the Fields collection of Record objects.
If the Record object represents a row in a Recordset, then it is possible to return to that original Recordset.
The Record object can model tree-structured namespaces. Each node in the tree is a Record object with associated columns. The columns can represent the attributes of that node and other relevant information. The Record object can represent both a leaf node and a non-leaf node in the tree structure. Non-leaf nodes have other nodes as their contents while leaf nodes do not have such contents. Leaf nodes typically contain binary streams of data while non-leaf nodes may also have a default binary stream associated with them. Properties on the Record object identify the type of node.
The Record object also represents an alternative way for navigating hierarchically organized data. A Record object may be created to represent the root of a specific sub-tree in a large tree structure and new Record objects may be opened to represent child nodes.
A file or directory (that is, a resource) is uniquely identified by an absolute URL. A Connection object is implicitly created and set to the Record object when the Record is opened with an absolute URL. A Connection object may explicitly be set to the Record object via the ActiveConnection property. The files and directories accessible via the Connection object define the context in which Record operations may occur.
Data modification and navigation methods on the Record object also accept a relative URL, which locates a resource using an absolute URL or the Connection object context as a starting point.
A Connection object is associated with each Record object. Therefore, Record object operations can be part of a transaction by invoking Connection object transaction methods.
The Record object does not support ADO events, and therefore will not respond to notifications.
With the methods and properties of a Record object, you can do the following:
- Set or return the associated Connection object with the ActiveConnection property.
- Indicate access permissions with the Mode property.
- Return the URL of the directory, if any, that contains the resource represented by the Record with the ParentURL property.
- Indicate the absolute URL, relative URL, or Recordset from which the Record is derived with the Source property.
- Indicate the current status of the Record with the State property.
- Indicate the type of Record—simple, collection, or structured document—with the RecordType property.
- Halt execution of an asynchronous operation with the Cancel method.
- Disassociate the Record from a data source with the Close method.
- Copy the file or directory represented by a Record to another location with the CopyRecord method.
- Delete the file, or directory and subdirectories, represented by a Record with the DeleteRecord method.
- Open a Recordset containing rows that represent the subdirectories and files of the entity represented by the Record with the GetChildren method.
- Move (rename) the file, or directory and subdirectories, represented by a Record to another location with the MoveRecord method.
- Associate the Record with an existing data source, or create a new file or directory with the Open method.