Professional Web Applications Themes

Microsoft VBScript runtime (0x800A01A8) Object required: '' - ASP

Hello! I have a small ASP/Javascript Application that does a basic db (SQL Server)lookup and produces the results of the search. This app works fine on one box (WinNT, IIS4.0) and produces the following error on a newer box (Win2000, IIS5.0) Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' continued...

  1. #1

    Default Microsoft VBScript runtime (0x800A01A8) Object required: ''

    Hello! I have a small ASP/Javascript Application that
    does a basic db (SQL Server)lookup and produces the
    results of the search. This app works fine on one box
    (WinNT, IIS4.0) and produces the following error on a
    newer box (Win2000, IIS5.0)

    Error Type:
    Microsoft VBScript runtime (0x800A01A8)
    Object required: ''
    /directory/storedirectory.asp, line 315

    Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
    Page:
    GET /directory/storedirectory.asp

    Line 315 is:
    315 --> If rs.EOF or rs.BOF Then
    316 --> STRSHOP = STRSHOP & 0 & ")"

    Your help is appreciated!
    Thanks!
    TC
    TC Guest

  2. #2

    Default Re: Microsoft VBScript runtime (0x800A01A8) Object required: ''

    Do you have any lines that say something like:

    SET rs = something

    ?

    Ray at work

    "TC" <iam2t@go.com> wrote in message
    news:067101c37d24$5c719c70$a001280a@phx.gbl...
    > Error Type:
    > Microsoft VBScript runtime (0x800A01A8)
    > Object required: ''
    > /directory/storedirectory.asp, line 315
    >
    > Line 315 is:
    > 315 --> If rs.EOF or rs.BOF Then

    Ray at Guest

  3. #3

    Default Re: Microsoft VBScript runtime (0x800A01A8) Object required: ''

    > 315 --> If rs.EOF or rs.BOF Then

    Once you figure out that earlier in the code, you used set rst =
    conn.execute("some query") or set rst = createobject("ADODB.Recordset"), you
    can remove the test for BOF. BOF is where you start in a perfectly valid
    result, so if rs.eof is false, and there is a valid resultset, BOF will be
    true, and this logic will still be entered. I think you meant to check:

    if not rs.eof then
    ' there is a valid result, loop through!
    else
    STRSHOP = STRSHOP & 0 & ")"
    end if


    Aaron Bertrand - MVP Guest

  4. #4

    Default Re: Microsoft VBScript runtime (0x800A01A8) Object required: ''

    Thanks Aaron we tried that and got the same result.

    This is what our code is doing...

    if "something" then
    javascript to go to another page
    else
    set rs = "SQL stmt"
    end if
    ....
    ....
    ....
    then we use the rs here.

    .... our problem is that when "something" is true, we're
    not getting to the other page. It seems to want to finish
    loading the current page and we get the error when we use
    the rs further down in the code. Again, this is working
    on IIS4/NT and not IIS5/Win2k.

    >-----Original Message-----
    >> 315 --> If rs.EOF or rs.BOF Then
    >
    >Once you figure out that earlier in the code, you used
    set rst =
    >conn.execute("some query") or set rst = createobject
    ("ADODB.Recordset"), you
    >can remove the test for BOF. BOF is where you start in a
    perfectly valid
    >result, so if rs.eof is false, and there is a valid
    resultset, BOF will be
    >true, and this logic will still be entered. I think you
    meant to check:
    >
    >if not rs.eof then
    > ' there is a valid result, loop through!
    >else
    > STRSHOP = STRSHOP & 0 & ")"
    >end if
    >
    >
    >.
    >
    TC Guest

  5. #5

    Default Re: Microsoft VBScript runtime (0x800A01A8) Object required: ''

    Thanks Ray,
    We do have that statement. If you look at the message we
    just posted after Aaron's reponse, it explains a bit
    better what we're getting. The problem is that we are not
    getting sent to another page before we use the rs later in
    the code.
    >-----Original Message-----
    >Do you have any lines that say something like:
    >
    >SET rs = something
    >
    >?
    >
    >Ray at work
    >
    >"TC" <iam2t@go.com> wrote in message
    >news:067101c37d24$5c719c70$a001280a@phx.gbl...
    >> Error Type:
    >> Microsoft VBScript runtime (0x800A01A8)
    >> Object required: ''
    >> /directory/storedirectory.asp, line 315
    >>
    >> Line 315 is:
    >> 315 --> If rs.EOF or rs.BOF Then
    >
    >
    >.
    >
    TC Guest

  6. #6

    Default Re: Microsoft VBScript runtime (0x800A01A8) Object required: ''

    When you say you're using javascript to go to another page, are you talking
    about client side script? You can't toss in some client side script in the
    middle of your asp page and have it process like that. The client processes
    client side script, so yes, that won't happen until the server has processed
    the page and sent it to the client, unless you flush the response or
    something, perhaps. What about:

    if "something" then
    Response.Redirect "your url"
    Else
    ''your code
    End If

    Ray at work

    "TC" <corter@racenter.com> wrote in message
    news:65b201c37d55$542e79d0$a601280a@phx.gbl...
    > Thanks Aaron we tried that and got the same result.
    >
    > This is what our code is doing...
    >
    > if "something" then
    > javascript to go to another page
    > else
    > set rs = "SQL stmt"
    > end if
    > ...
    > ...
    > ...
    > then we use the rs here.
    >
    > ... our problem is that when "something" is true, we're
    > not getting to the other page. It seems to want to finish
    > loading the current page and we get the error when we use
    > the rs further down in the code. Again, this is working
    > on IIS4/NT and not IIS5/Win2k.
    >
    >

    Ray at Guest

  7. #7

    Default Re: Microsoft VBScript runtime (0x800A01A8) Object required: ''

    Why does anything further down the page have to be outside the if/else?


    if something then
    response.redirect "somewhere else"
    response.end
    else
    set rs = "SQL stmt"
    ...
    If not rs.EOF Then
    ...
    end if
    ...
    end if








    "TC" <corter@racenter.com> wrote in message
    news:65b201c37d55$542e79d0$a601280a@phx.gbl...
    > Thanks Aaron we tried that and got the same result.
    >
    > This is what our code is doing...
    >
    > if "something" then
    > javascript to go to another page
    > else
    > set rs = "SQL stmt"
    > end if
    > ...
    > ...
    > ...
    > then we use the rs here.
    >
    > ... our problem is that when "something" is true, we're
    > not getting to the other page. It seems to want to finish
    > loading the current page and we get the error when we use
    > the rs further down in the code. Again, this is working
    > on IIS4/NT and not IIS5/Win2k.
    >
    >
    > >-----Original Message-----
    > >> 315 --> If rs.EOF or rs.BOF Then
    > >
    > >Once you figure out that earlier in the code, you used
    > set rst =
    > >conn.execute("some query") or set rst = createobject
    > ("ADODB.Recordset"), you
    > >can remove the test for BOF. BOF is where you start in a
    > perfectly valid
    > >result, so if rs.eof is false, and there is a valid
    > resultset, BOF will be
    > >true, and this logic will still be entered. I think you
    > meant to check:
    > >
    > >if not rs.eof then
    > > ' there is a valid result, loop through!
    > >else
    > > STRSHOP = STRSHOP & 0 & ")"
    > >end if
    > >
    > >
    > >.
    > >

    Aaron Bertrand - MVP Guest

  8. #8

    Default Re: Microsoft VBScript runtime (0x800A01A8) Object required: ''

    On NT4 I believe that the default for buffering is off, so your javascript
    is sent to the client and executed.
    On NT5 it's the opposite.
    So stick in a Response.end as Aaron suggested.


    "TC" <corter@racenter.com> wrote in message
    news:65b201c37d55$542e79d0$a601280a@phx.gbl...
    > Thanks Aaron we tried that and got the same result.
    >
    > This is what our code is doing...
    >
    > if "something" then
    > javascript to go to another page
    > else
    > set rs = "SQL stmt"
    > end if
    > ...
    > ...
    > ...
    > then we use the rs here.
    >
    > ... our problem is that when "something" is true, we're
    > not getting to the other page. It seems to want to finish
    > loading the current page and we get the error when we use
    > the rs further down in the code. Again, this is working
    > on IIS4/NT and not IIS5/Win2k.
    >
    >
    > >-----Original Message-----
    > >> 315 --> If rs.EOF or rs.BOF Then
    > >
    > >Once you figure out that earlier in the code, you used
    > set rst =
    > >conn.execute("some query") or set rst = createobject
    > ("ADODB.Recordset"), you
    > >can remove the test for BOF. BOF is where you start in a
    > perfectly valid
    > >result, so if rs.eof is false, and there is a valid
    > resultset, BOF will be
    > >true, and this logic will still be entered. I think you
    > meant to check:
    > >
    > >if not rs.eof then
    > > ' there is a valid result, loop through!
    > >else
    > > STRSHOP = STRSHOP & 0 & ")"
    > >end if
    > >
    > >
    > >.
    > >

    Tom B Guest

Similar Threads

  1. Replies: 11
    Last Post: August 25th, 04:44 PM
  2. Error : Microsoft VBScript runtime (0x800A000D)
    By virweb in forum Dreamweaver AppDev
    Replies: 2
    Last Post: May 16th, 11:14 PM
  3. Microsoft VBScript runtime error '800a000d' ??
    By James in forum Dreamweaver AppDev
    Replies: 5
    Last Post: May 12th, 07:12 PM
  4. Microsoft VBScript runtime error '800a01fb'
    By MDB in forum ASP Database
    Replies: 6
    Last Post: April 9th, 12:38 AM
  5. Microsoft VBScript runtime error '800a0046'
    By nicholas.gadacz in forum ASP
    Replies: 8
    Last Post: May 12th, 07:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139