ADO Stream Object | Novice Tutorial
Novice Tutorial -- Learning is not just technology, but also dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
ADO Tutorial
ADO TutorialADO IntroductionADO Database ConnectionADO ADO Recordset (Record Set)ADO DisplayADO QueryADO SortADO Add RecordsADO Update RecordsADO Delete RecordsADO Accelerate Scripts with GetString()ADO Command ObjectADO Connection ObjectADO Error ObjectADO Field ObjectADO Parameter ObjectADO Property ObjectADO Record ObjectADO Recordset ObjectADO Stream ObjectADO Data TypesADO SummaryADO Examples
ADO Stream Object
Stream Object (ADO version 2.5)
The ADO Stream object is used to read and write and process binary data or text streams.
The Stream object can be obtained through three methods:
- Through a URL pointing to an object containing binary or text data (usually a file). This object can be a simple document, a Record object representing a structured document, or a folder.
- By instantiating a Stream object. These Stream objects can be used to store data for applications. Unlike Streams associated with URLs or default Streams of Records, instantiated Streams are not associated with the underlying source by default.
- By opening the default Stream object associated with a Record object. The default stream associated with a Record object can be obtained when opening a Record. Simply opening the stream eliminates a round trip.
Syntax
objectname.property
objectname.method
Properties
| Property | Description |
|---|---|
| CharSet | Specifies the character set used to store the Stream. |
| EOS | Returns whether the current position is at the end of the stream. |
| LineSeparator | Sets or returns the line separator used in text Stream objects. |
| Mode | Sets or returns available permissions for modifying data. |
| Position | Sets or returns the current position from the beginning of the Stream object (in bytes). |
| Size | Returns the size of an open Stream object. |
| State | Returns a value describing whether the Stream is open or closed. |
| Type | Sets or returns the type of data in the Stream object. |
Methods
| Method | Description |
|---|---|
| Cancel | Cancels the execution of an Open call on a Stream object. |
| Close | Closes a Stream object. |
| CopyTo | Copies a specified number of characters/bits from one Stream object to another Stream object. |
| Flush | Sends the contents of the Stream buffer to the associated underlying object. |
| LoadFromFile | Loads the contents of a file into a Stream object. |
| Open | Opens a Stream object. |
| Read | Reads all the stream or a specified number of bytes from a binary Stream object. |
| ReadText | Reads all the stream, one line, or a specified number of bytes from a text Stream object. |
| SaveToFile | Saves the binary content of a Stream object to a file. |
| SetEOS | Sets the current position to the end of the stream (EOS). |
| SkipLine | Skips a line when reading a text stream. |
| Write | Writes binary data to a binary Stream object. |
| WriteText | Writes character data to a text Stream object. |
YouTip