Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











OBJECT:  Stream

Implemented in version 2.5

Stream

The ADO Stream object provides access to a stream of binary data or text. By access, we mean the ability to read, write, and manage the stream.

For example, you can use the Record and Recordset objects to gain access to files on a Web server, and then use the Stream object to gain access and manipulate the actual contents of those files.

There are three major ways to obtain a Stream object:
  • From a URL pointing to a file, folder, or a Record object.
  • By instantiating a Stream object to store data for your application.
  • By opening the default Stream object associated with a Record object.

    PROPERTIES

    CharSet Property
    Sets or returns a string value that specifies into which character set the contents of a text Stream are to be translated.

    Syntax: streamobject. CharSet

    EOS Property
    Returns a Boolean value indicating whether or not the current position is at the end of the stream.

    Syntax: streamobject. EOS

    LineSeparator Property
    Sets or returns a LineSeparatorEnum value that specifies which binary character to use as the line separator in a text Stream object.

    Syntax: streamobject. LineSeparator

    Mode Property
    Sets or returns a ConnectModeEnum value that specifies the available permissions for modifying data.

    Syntax: streamobject. Mode

    Position Property
    Sets or returns a long value that specifies the current position, measured in bytes, from the beginning of the stream.

    Syntax: streamobject. Position

    Size Property
    Returns a long value that is the size in bytes of an opened Stream object.

    Syntax: streamobject. Size

    State Property
    Returns a long value describing if the Stream object is open or closed.

    Syntax: streamobject. State

    Type Property
    Sets or returns a StreamTypeEnum value defining if the data is binary or text.

    Syntax: streamobject. Type

    METHODS

    Cancel Method
    Cancels the execution of a pending Open call.

    Syntax: streamobject. Cancel

    Close Method
    Close a Stream object.

    Syntax: streamobject. Close

    CopyTo Method
    Copies the specified number of characters or bytes from one Stream object to another Stream object.

    Syntax: streamobject. CopyTo (DestStream, NumChars)

    Flush Method
    Sends the contents of the Stream object to the underlying object that is the source of the Stream object.

    Syntax: streamobject. Flush (FileName)

    LoadFromFile Method
    Loads the contents of an existing file into an open Stream object.

    Syntax: streamobject. LoadFromFile (FileName)

    Open Method
    Opens a Stream object from a URL or Record object.

    Syntax: streamobject. Open (Source, Mode, OpenOptions, UserName,  Password)

    Read Method
    Reads the specified number of bytes from a binary Stream object and returns the data as a variant.

    Syntax: streamobject. Read (NumBytes)

    ReadText Method
    Reads the specified number of bytes from a text Stream object and returns the data as a string.

    Syntax: streamobject. ReadText (NumChars)

    SaveToFile Method
    Copies (saves) the contents of an opened Stream object to a specified file.

    Syntax: streamobject. SaveToFile (FileName, SaveOptions)

    SetEOS Method
    Sets the value of the EOS property to be the current position.

    Syntax: streamobject. SetEOS

    SkipLine Method
    Skips all of the characters on one entire line, including the next line separator, while reading a text stream.

    Syntax: streamobject. Skipline

    Write Method
    Writes a specified number of bytes of binary data to an opened Stream object without adding any intervening spaces.

    Syntax: streamobject. Write (Buffer)

    WriteText Method
    Writes a specified text string to an opened Stream object without adding any intervening spaces or characters.

    Syntax: streamobject. WriteText (Data, Options)

  •  


    Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
    Trademark Information