Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

ado
activex

What is the ActiveX data object (ADO) stream object?

Behzad Ahmad

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

The ActiveX Data Object (ADO) module is a programming model that allows programs in C++ and Visual Basic to connect to a database or SQL server.

This module includes several types of objects, including the stream object. The stream object can read, write, and manage text or binary streams.

The stream object has certain methods and properties associated with it, which are described below.

Methods

  • Read: Reads the entire stream or a specified number of bytes from a binary stream object.

  • Write: Writes binary data to a binary stream object.

  • Open: Opens a stream object.

  • Close: Closes a stream object.

  • Cancel: Cancels the execution of an open asynchronous call on a stream object.

  • ReadText: Reads the entire stream or a specified number of bytes from a text stream object.

  • WriteText: Writes string data to a text stream object, without spaces or characters between strings.

  • CopyTo: Copies a specified number of characters/bytes from one stream object to another.

  • Flush: Sends the contents of the stream buffer to the associated underlying object.

  • LoadFromFile: Loads the contents of a local file into a stream object.

  • SaveToFile: Saves the content of an open stream object to a file.

  • SkipLine: When reading a text stream, this skips a line of characters until the next line character.

  • SetEOS: Sets the current position as the end of the file, updating the EOS property.

Properties

  • Size: Returns the size of an open stream object in bytes.

  • State: A read-only property that returns the value of the current state of the object.

  • Type: Used to set or return the type of data in a stream object as a StreamTypeEnum value.

  • Position: Sets or returns the offset of the current position in bytes from the start of the stream.

  • EOS: A boolean property that checks whether or not the current position is at the end of the stream.

  • Mode: Sets or returns the permissions for a connection that is being used by the provider.

  • LineSeperator: Sets or returns the line separator character used, which has the default value of adCRLF.

  • CharSet: Sets or returns a value that specifies into which character set the contents are to be translated.

RELATED TAGS

ado
activex

CONTRIBUTOR

Behzad Ahmad
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring