Open Directory Site ADO Tutorials

ASP | XML | VBScript | JavaScript | ADO | CSS | XMLDOM | PHP | Operating Systems

Home >> ADO >> ADO Stream object

ADO Stream object

 

Stream Object

The Stream Object is used to manipulate binary files and text files.

Syntax

objectname.property objectname.method

Properties

Property Description

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

EOS Returns True if the current position is at the end of the stream, false if not

LineSeparator Sets or returns which binary character to use as the line separator in a text Stream object

Mode Sets or returns the available permissions for modifying data

Position Sets or returns the current position from the beginning of the stream

Size Returns the size of a Stream object

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

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

Methods

Method Description

Cancel Cancels an execution of an Open call

Close Closes a Stream object

CopyTo(deststream, numchars)

Copies a specified number of characters or bytes from one Stream object to another Stream object

Flush(filename) Sends the contents of the Stream object to the underlying object

LoadFromFile(filename) Loads the contents of a file into a Stream object

Open(source, mode, openoptions, username, password)

Opens a Stream object from a URL or Record object

Read(numbytes) Reads a specified number of bytes from a binary Stream object

ReadText(numchars) Reads a specified number of characters from a text Stream object

SaveToFile(filename, saveoptions)

Saves the contents of a Stream object to a file

SetEOS Sets the value of the EOS property to the current position

SkipLine Skips a line when reading a text stream

Write(buffer) Writes a specified number of bytes of binary data to a Stream object

WriteText(data, options) Writes a specified text string to a Stream object

ADO Examples

Display

Display records from a database in an HTML page

Display records in an HTML table

Add headers to the HTML table to make it more readable

Add colors to the HTML table

SQL

Display only data that matches a certain criteria

Sort the records on a specified fieldname

Recordset Object

GetRows

ADO Books

Book

Beginning ASP Databases

September 1999 Explains the theory and practice of using ADO with ASP by presenting examples, exercises, lists of common errors and quizzes.

Web Database Development Step by Step

March 2000 Discusses the major Internet database technologies to show you how to create powerful, flexible Web databases that can serve your needs today and scale for the future.

Professional ADO 2.5 RDS Programming with ASP 3.0

January 2000 Gets you up to speed on ADO and RDS, and provides in-depth coverage of using them to maximum effect in ASP web applications.

Cheap Web Hosting Articles - Web Site Design & Web Hosting Tutorials - Domain Hosting