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











METHOD:  Stream::ReadText

Implemented in version 2.5

string = streamobject.ReadText (NumBytes)

The ReadText method is used to read an entire text file or a specified number of characters from a Stream object and to return the data as a string.

This method is used exclusively for text data type Stream objects. Please use the similar Read method for binary data type Stream objects.

There is one optional parameter.

The optional NumBytes parameter is either the number of characters to read or one of the StreamReadEnum constants. If you specify a number larger than the actual number of characters available in the Stream, only the actual available characters are read and no error is generated. A null value is returned if there are no characters left to be read.
 
StreamReadEnum Constants
 
Constant Value Description
adReadAll -1 Default, read from the current position to EOS
adReadLine -2 Only read until the end of the current line

 
Code (VBScript):
Dim strStreamText
strStreamText = objStream.ReadText adReadAll
or
Dim intNumChars, strStreamText
intNumChars = 1000
...
strStreamText = objStream.ReadText intNumChars

 


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