Home All Groups Group Topic Archive Search About

Request.BinaryRead(count)

Author
11 Oct 2006 9:36 AM
Water Cooler v2
Just trying to experiment with the Request.BinaryRead(count) method.
What's wrong with this script?

<SCRIPT Language="VBScript" runat="server">

Dim b
b = Request.BinaryRead(Request.TotalBytes)
Dim Counter

If IsArray(b) Then
    If Not IsEmpty(b) Then
        Response.Write(LBound(b) & ", " & UBound(b))
        'For Counter = LBound(b) To UBound(b)
        '    Response.Write(CStr(b(Counter)))
        'Next
    End If
End If

</SCRIPT>

Author
11 Oct 2006 10:40 AM
Bob Barrows [MVP]
Water Cooler v2 wrote:
> Just trying to experiment with the Request.BinaryRead(count) method.
> What's wrong with this script?

What are we looking for? What makes you think something is wrong with it?
Symptoms? error messages?

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Are all your drivers up to date? click for free checkup

Author
11 Oct 2006 11:50 AM
Anthony Jones
Show quote Hide quote
"Water Cooler v2" <wtr_***@yahoo.com> wrote in message
news:1160559407.619756.110670@m73g2000cwd.googlegroups.com...
> Just trying to experiment with the Request.BinaryRead(count) method.
> What's wrong with this script?
>
> <SCRIPT Language="VBScript" runat="server">
>
> Dim b
> b = Request.BinaryRead(Request.TotalBytes)
> Dim Counter
>
> If IsArray(b) Then
> If Not IsEmpty(b) Then
> Response.Write(LBound(b) & ", " & UBound(b))
> 'For Counter = LBound(b) To UBound(b)
> ' Response.Write(CStr(b(Counter)))
> 'Next
> End If
> End If
>
> </SCRIPT>
>

If TotalBytes = 0 then b contains a variant marked as an Array but the
pointer to the array is null.
Since it is an array it isn't empty.
Using LBound ot UBound on an undimensioned array results in a subscript out
of range error.

Bookmark and Share