Request.BinaryRead(count)

Discussion in 'ASP General' started by Water Cooler v2, Oct 11, 2006.

  1. 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>
     
    Water Cooler v2, Oct 11, 2006
    #1
    1. Advertising

  2. 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"
     
    Bob Barrows [MVP], Oct 11, 2006
    #2
    1. Advertising

  3. "Water Cooler v2" <> wrote in message
    news:...
    > 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.
     
    Anthony Jones, Oct 11, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Birtle
    Replies:
    2
    Views:
    2,139
    John Saunders
    Oct 16, 2003
  2. Lau Lei Cheong

    Question about using Request.BinaryRead()

    Lau Lei Cheong, Aug 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    667
    bruce barker
    Aug 23, 2004
  3. Nikhil
    Replies:
    1
    Views:
    188
    GVaught
    Sep 11, 2003
  4. Roberto
    Replies:
    1
    Views:
    159
  5. Replies:
    0
    Views:
    359
Loading...

Share This Page