ADODB. Stream is a stream object of ADO. It provides access to binary data or text streams to implement stream read, write, and management operations.

Source: Internet
Author: User
ADODB. Stream is a stream object of ADO. It provides access to binary data or text streams to implement stream read, write, and management operations.

There are the following methods:
Cancel Method
The usage is as follows:
Object. Cancel
Description: cancels the call of an asynchronous execute or open method suspended for execution.
Close Method
The usage is as follows:
Object. Close
: Close the object
Copyto Method
The usage is as follows:
Object. copyto (deststream, [charnumber])
Note: copy the data of the image. deststream points to the image to be copied. charnumber is an optional parameter, indicating the number of bytes to be copied. If not, it is all copied.
Flush Method
The usage is as follows:
Object. Flush
Note:
Loadfromfile Method
The usage is as follows:
Object. loadfromfile (filename)
Note: mount the file specified by filename into the object. The filename parameter is the specified user name.
Open Method
The usage is as follows:
Object. Open (source, [mode], [Options], [username], [Password])
Note: Open the object,
Parameter description: sourece object source, not specified
Mode specifies the open mode. Optional parameters are as follows:
Admoderead = 1
Admodereadwrite = 3
Admoderecursive = 4194304
Admodesharedenynone = 16
Admodesharedenyread = 4
Admodesharedenywrite = 8
Admodemo-exclusive = 12
Admodeunknown = 0
Admodewrite = 2
Options:
Adopenstreamasync = 1
Adopenstreamfromrecord = 4
Adopenstreamunspecified =-1
Username: Specifies the user name. Do not specify it.
Password specifies the password of the user name
Read Method
The usage is as follows:
Object. Read (numbytes)
Description: reads the binary content of the specified length.
Parameter description: numbytes specifies the degree to be read. If not specified, all data is read.

Readtext Method
The usage is as follows:
Object. readtext (numchars)
Description: reads the text of a specified length.
Parameter description: numchars specifies the degree to be read. If it is not specified, all data is read.

Savetofile Method
The usage is as follows:
Object. savetofile (filename, [Options])
Description: writes the object content to the file specified by filename.
Parameter description: file specified by filename
The options access option is not specified. The optional parameters are as follows:
Adsavecreatenotexist = 1
Adsavecreateoverwrite = 2

Seteos Method
The usage is as follows:
Object. seteos ()
Note:
Skipline Method
The usage is as follows:
Object. skipline ()
Note:
Write Method
The usage is as follows:
Object. Write (buffer)
Description: loads the specified data into the object.
Parameter description: buffer is the specified content to be written.
Writetext Method
The usage is as follows:
Object. Write (data, [Options])
Description: loads the specified text data into the object.
Parameter description: data is the specified content to be written.
The options write option is not specified. The optional parameters are as follows:
Adwritechar = 0
Adwriteline = 1

 

Has the following attributes:
Charset
Whether the data in the object is null is returned by EOS.

Lineseparator specifies the line feed format. Optional parameters include
Adcr = 13
Adcrlf =-1
Adlf = 10
 
Mode or return mode.
 
Position specifies or returns the current pointer to the data in the image.
 
Size returns the size of the data in the object.
 
Whether the status of the State add-back object is enabled.
 
Data type specified or returned. The optional parameter is:
Adtypebinary = 1
Adtypetext = 2

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.