Previous PageNext Page

6.2.6 BinaryRead Method

The BinaryRead method reads information sent from the client to the server as part of a POST request. The data is returned as a SafeArray that contains information about the dimensions of the array.
 

Syntax

variant = Request.BinaryRead(count)

Parameters

variant
An array of unsigned bytes returned by this method.
count
Before the read, the number of bytes to read from the client. After execution the actual number of bytes successfully read from the client. The number of bytes that will be read is less than or equal to Request.TotalBytes.

Remarks

The BinaryRead method is used to read the raw data sent by a POST request. This provides low-level access as opposed to the formatted data provided by the Request.Form collection. Once you have used the BinaryRead method any call to a variable in the Request.Form collection will cause an error. Conversely, calling BinaryRead after accessing the Request.Form collection will also cause an error. Remember if you access a variable in the Request object without specifying a collection the Request.Form collection may be accessed, bringing this rule into force.
 

Example

The following example uses the BinaryRead method to place the contents of a Request object into a safe array.
 

<%

dim bytecount

dim binread

bytecount = Request.TotalBytes

binread = Request.BinaryRead(bytecount)

%>


Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page