Instructions on the use of ADODB.stream

Source: Internet
Author: User
Tags object copy flush
Ado|stream|ado|stream component: "ADODB.stream"
The following methods are available:
Cancel method
Use the following methods
Object.cancel
Description: Cancels the call to execute a pending asynchronous Execute or Open method.
Close method
Use the following methods
Object.close
: Off to Like
CopyTo method
Use the following methods
Object.copyto (Deststream,[charnumber])
Description: Copy the data for the image, Deststream points to the image to be copied, charnumber as optional, the number of bytes to copy, not all copied.
Flush method
Use the following methods
Object.flush
Description
LoadFromFile method
Use the following methods
Object.loadfromfile (FileName)
Note: The file specified by filename is loaded into the image, and the parameter filename is the specified username.
Open method
Use the following methods
Object.open (Source,[mode],[options],[username],[password])
Description: Open to the image,
Parameter description: sourece to Image source, not specified
mode specifies open mode, not specified, with optional parameters as follows:
adModeRead =1
adModeReadWrite =3
Admoderecursive =4194304
adModeShareDenyNone =16
adModeShareDenyRead =4
adModeShareDenyWrite =8
Admodeshareexclusive =12
adModeUnknown =0
adModeWrite =2
Options to specify an option to open, optional parameters are as follows:
Adopenstreamasync =1
adOpenStreamFromRecord =4
Adopenstreamunspecified=-1
USERNAME Specifies the user name, not specified.
Password the password for the specified user name
Read method
Use the following methods:
Object.read (numbytes)
Note: reads the binary content of the specified length.
Parameter Description: numbytes Specifies the search degree to read, and reads all without specifying.

ReadText method
Use the following methods:
Object.readtext (NumChars)
Description: Reads text of the specified length
Parameter Description: numchars Specifies the search degree to read, and reads all without specifying.

SaveToFile method
Use the following methods:
Object.savetofile (Filename,[options])
Description: Writes the contents of the image to the file specified by filename
Parameter description: File specified by filename
Options access option, not specified, optional parameters are as follows:
Adsavecreatenotexist =1
Adsavecreateoverwrite =2

SetEOS method
Use the following methods:
Object.seteos ()
Description
SkipLine method
Use the following methods:
Object.skipline ()
Description
Write method
Use the following methods:
Object.write (Buffer)
Description: Loads the specified data into a pair image.
Parameter description: Buffer for the specified content to be written.
WriteText method
Use the following methods:
Object.write (Data,[options])
Description: Loads the specified text data into a pair image.
Parameter description: Data is the specified content to be written.
Options are written without specifying the optional parameters as follows:
Adwritechar =0
Adwriteline =1




The following properties are available:
Charset
EOS returns whether the data in the image is empty.

lineseparator specifies a newline format, with optional parameters
AdCR =13
adCRLF =-1
Adlf =10

mode specifies or returns modes.

POSITION specifies or returns the current pointer to the data in the image.

Size returns the amount of data within the image.

Whether the state back-add pair is open.

Type specifies or returns the data types, optional parameters are:
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.