What's New in ADO
The following new features, new reference topics, and new and enhanced documentation are included in the ADO 2.5 release.
New Features
This release of ADO introduces the Record object, which can represent and manage things like directories and files in a file system, and 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 new Stream object provides the means to read, write, and manage the binary stream of bytes or text that comprise a file or message stream.
This release also introduces the use of Uniform Resource Locators (URLs), as an alternative to connection strings and command text, to name data store objects. URLs may be used with the existing Connection and Recordset objects, as well as with the new Record and Stream objects.
With this release, ADO supports OLE DB providers that recognize their own URL schemes. For example, the OLE DB Provider for Internet Publishing, which accesses the Windows 2000 file system, recognizes the existing HTTP scheme.
Special Fields for Document Source Providers
A special class of providers, called document source providers, manage folders and documents. When a Record object represents a document, or a Recordset object represents a folder of documents, the document source provider populates those objects with a unique set of fields that describe characteristics of the document. These fields constitute a resource Record or Recordset.
New Reference Topics
The following new properties are included in this release.
Property | Description |
---|---|
Charset | Indicates the character set into which the contents of a text Stream object should be translated. |
EOS | Indicates whether the current position is at the end of the stream. |
LineSeparator | Indicates the binary character to be used as the line separator in text Stream objects. |
Mode | Indicates the available permissions for modifying data in a Connection, Record, or Stream object. |
ParentURL | Indicates an absolute URL string that points to the parent Record of the current Record object. |
Position | Indicates the current position within a Stream object. |
RecordType | Indicates the type of Record object. |
Size | Indicates the size of the stream in number of bytes. |
Source | Indicates the entity represented by the Record object. |
State | Indicates for all applicable objects whether the state of the object is open or closed.
Indicates for all applicable objects executing an asynchronous method, whether the current state of the object is connecting, executing, or retrieving. |
Type | Indicates the type of data contained in the Stream object (binary or text). |
The following new methods are included in this release.
Method | Description |
---|---|
CopyRecord | Copies a file or directory, and its contents, to another location. |
CopyTo | Copies the specified number of characters or bytes (depending on Type) in the Stream object to another Stream object. |
DeleteRecord | Deletes a file or directory, and all its subdirectories. |
Flush | Forces the contents of the Stream object remaining in the ADO buffer to the underlying object with which the Stream object is associated. |
GetChildren | Returns a Recordset whose rows represent the files and subdirectories in the directory represented by this Record. |
LoadFromFile | Loads the contents of an existing file into a Stream object. |
MoveRecord | Moves a file, or a directory and its contents, to another location. |
Open | Opens an existing Record object, or creates a new file or directory. |
Open | Opens a Stream object to manipulate streams of binary or text data. |
Read | Reads a specified number of bytes from a binary Stream object. |
ReadText | Reads specified number of characters from a text Stream object. |
SaveToFile | Saves the binary contents of a Stream to a file. |
SetEOS | Sets the position that is the end of the stream. |
SkipLine | Skips one entire line when reading a text Stream object. |
Write | Writes binary data to a Stream object. |
WriteText | Writes a specified text string to a Stream object. |
New and Enhanced Documentation
The examples have been expanded to contain code examples written in Microsoft Visual C++® and Microsoft Visual J++®. You can copy and paste these code examples into your editor.
A new topic is included that explains how to use ADO with the OLE DB Provider for Internet Publishing.
This new section contains tips and tricks for using ADO with various programming languages. It contains the existing syntax indexes for the Visual C++ Extensions for ADO and ADO/WFC, as well as new information specific to developers using Microsoft Visual Basic®, Microsoft Visual Basic® Scripting Edition, Microsoft JScript®, Microsoft Visual C++, or Microsoft Visual J++.