Records and Streams

Microsoft ActiveX Data Objects (ADO)

Records and Streams

ADO currently provides a simple means of accessing information in data sources, such as relational databases. However, a lot of information does not exist as tables in databases, but as messages in electronic mail systems and files in modern file systems. The Record and Stream objects facilitate access to information stored in sources other than relational databases.

The Record object can represent and manage data such as directories and files in a file system, or folders and messages in an e-mail system. A Record can also represent a row in a Recordset, although Record and Recordset objects have different methods and properties.

The Stream object provides the means to read, write, and manage the binary stream of bytes that comprise a file or message.

Uniform Resource Locators (URLs) can be used as an alternative to connection strings and command text to specify data sources and the location of files and directories. You can use URLs with the existing Connection and Recordset objects, as well as with the Record and Stream objects.

Several ADO objects have been enhanced to work in conjunction with Record and Stream objects.

  • The Fields collection Append method, which creates and adds a Field object to the collection, can also specify the value of the Field.

  • The Update method finalizes the addition or deletion of fields to the collection.

  • As a shortcut and alternative to the Append method, you may create fields by simply assigning a value to an undefined or previously deleted field.

(For purposes of discussion, subsequent use of the term directory will also mean folders, and the term file will also mean messages.)

See the following topics to learn more about using Record and Stream objects.