当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO ReadText 方法

ADO
ADO DataTypes
ADO 摘要
ADO 实例

ADO ReadText 方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 399 ::
收藏到网摘: n/a

The ReadText method is used to read the entire stream, a line, or a specified number of characters from a text Stream object and returns the resulting data as a string.
ReadText方法的作用是:从一个文本记录流对象中读出一行或是指定数量的字符或是整段记录流内容,并以一个字符串的形式返回结果数据。

Note: This method is only used with text Stream objects, for binary Stream objects, use the Read method.
注意:这个方法仅用在文本记录流对象中[text Stream objects];如果需要对二进制记录流对象进行操作[binary Stream objects],那么需要使用Read方法。

Syntax
语法

str=objStream.ReadText numchars

Parameter参数 Description描述
numchars Optional. The number of characters to read from the file, or a StreamReadEnum value. Default is adReadAll
可选参数。指定从文件中或从一个StreamReadEnum值中读取的字节数。默认值为adReadAll

If you have specified more than the number of characters left in the Stream, only the character remaining are returned
如果你所指定的字符数量大于整个记录流的数量,那么紧返回保留字符



StreamReadEnum Values

Constant常量 Value值 Description描述
adReadAll -1 Default. Reads all characters from the stream, from the current position to EOS
默认值。读取记录流中从起始位置到末尾位置的所有字节
adReadLine -2 Reads the next line from the stream
读取记录流对象中的下一行

评论 (0) All

登陆 | 还没注册?