当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO Read 方法
The Read method is used to read the entire stream or a specified number of bytes from a binary Stream object and returns the resulting data as a variant.
Read的作用是:从一个二进制记录流对象中读出指定字节数的内容或整段记录流,并返回结果数据。
Note: This method is only used with binary Stream objects, for text Stream objects, use the ReadText method.
注意:这个方法仅用在二进制记录流对象中[binary Stream objects];如果需要对文本记录流对象进行操作[text Stream objects],那么需要使用ReadText方法。
var=objStream.Read numbytes |
Parameter参数 | Description描述 |
---|---|
numbytes | Optional. The number of bytes to read from the file, or a StreamReadEnum value. Default is adReadAll 可选参数。指定从文件中或从一个StreamReadEnum值中读取的字节数。默认值为adReadAll If you have specified more than the number of bytes left in the Stream, only the bytes remaining are returned. |
Constant常量 | Value值 | Description描述 |
---|---|---|
adReadAll | -1 | Default. Reads all bytes from the stream, from the current position to EOS. 默认值。读取记录流中从起始位置到末尾位置的所有字节 Note: This is the only valid value with binary Stream objects |