网络学院 w3pop社区 网络资源 IT新闻

w3pop.com :: 网络学院 :: ADO :: ADO ReadText 方法

会员登陆

帐号

密码

回答

记住密码

忘记密码? 注册

ADO ReadText 方法


作者:w3pop.com 翻译/整理:w3pop.com 发布:2007-04-28 浏览:1129 :: ::

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