Methods/properties of adodb.stream object
Cancel method
How to use it is as follows
Object.Cancel
Description: Cancel the execution of pending asynchronous Execute or Open method calls.
Close method
How to use it is as follows
Object.Close
: Close the object
CopyTo method
How to use it is as follows
Object.CopyTo(destStream,[CharNumber])
Description: Copy the data of the object, destStream points to the object to be copied, CharNumber is an optional parameter, which refers to the number of bytes to be copied, and does not select all copies.
Flush method
How to use it is as follows
Object.Flush
illustrate:
LoadFromFile method
How to use it is as follows
Object.LoadFromFile(FileName)
Description: Load the file specified by FileName into the object, and the parameter FileName is the specified user name.
Open method
How to use it is as follows
Object.Open(Source,[Mode],[Options],[UserName],[Password])
Description: Open the object,
Parameter description: Sourece object source, can not be specified
Mode specifies the opening mode, and can not be specified. The optional parameters are as follows:
adModeRead=1
adModeReadWrite=3
adModeRecursive=4194304
adModeShareDenyNone=16
adModeShareDenyRead=4
adModeShareDenyWrite=8
adModeShareExclusive=12
adModeUnknown=0
adModeWrite=2
Options specifies the option to open, but can not be specified. The optional parameters are as follows:
adOpenStreamAsync=1
adOpenStreamFromRecord=4
adOpenStreamUnspecified=-1
UserName specifies the username, but it can not be specified.
Password specifies the password for the username
Read method
How to use it is as follows:
Object.Read(Numbytes)
Description: Read binary content of the specified length.
Parameter description: The search degree to be read by Numbytes is specified, and if not specified, all of them are read.
ReadText method
How to use it is as follows:
Object.ReadText(NumChars)
Description: Read text of a specified length
Parameter description: NumChars specifies the search degree to be read, if not specified, all reads.
SaveToFile method
How to use it is as follows:
Object.SaveToFile(FileName,[Options])