7.4. Data Access with ADO

Accessing data is the reason why we use databases, and a large proportion of your programming will usually revolve around manipulating those objects that deal with data: views, stored procedures, and recordsets

7.4.1. The ADO Object Model

Figure 7.3. Figure 7-3

ADO actually supports two additional objects not shown in Figure 7-3: the Record and Stream objects.

The Record object can be seen as a single-row recordset. Although records have a limited functionality when compared to recordsets, they relieve you of the overhead of having to instantiate the more complex recordset. In addition, they have different properties and methods that can be quite useful.

The Record object can also manipulate data such as folders and files in a file system, e-mail messages, and so on. That means the source of data for the Record object can be the current row of a recordset, a Uniform Resource Locator (URL).

The Stream object reads, writes, and manages a stream of bytes. This byte stream can be text or binary, and is limited in size only by the available system resources.

You would typically use an ADO stream object to contain the text or bytes of a file or message supplied using a provider such as the Microsoft OLE DB Provider for Internet Publishing.

The data source for a stream object can be a file whose location is specified by a URL, a field in a record or recordset ...

Get Access 2003 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.