VB error Expected 'Wend'

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Raphael Gluck

    VB error Expected 'Wend'

    Hi
    I've been trying to hand code my pages, after failing in a WSYWYG editor and
    giving up.
    I'm almost done with the page checking, it's just i'm having a Wend error


    Microsoft VBScript compilation error '800a03fa'

    Expected 'Wend'

    /listing.asp, line 269

    on my page, www.tripak.me.uk/listing.asp

    I've attached the code at www.tripak.me.uk/listing.txt



    I believe that Originally when i used the WSYWYG I created two seperate
    recordsets, and the two endings were

    <%
    rsListing.Close ()
    Set rsListing = Nothing
    %>
    <%
    rsTextspec.Clos e()
    Set rsTextspec = Nothing
    %>

    Now i tried deleting the rsTextspec one but i still get an error with the
    rsListing one, which is the only recordset i have left.

    Am i supposed to delete this? and close it up ealier? (line 210) and how?

    I hope somone can help me.

    Raphael



  • Bob Barrows

    #2
    Re: VB error Expected 'Wend'

    These are the most aggravating problems. It could be anything from: you
    forgot to put a Wend in there, to: you've got an extra "end if" in your
    loop, to: you used Next or Loop instead of Wend. Proper formatting of your
    code (indenting, etc.) can help you find these issues.

    On another note: While...Wend has been deprecated and may not be supported
    in a future version of vbscript. You should switch to using Do Until ...
    Loop or Do ... Loop Until.

    HTH,
    Bob Barrows

    Raphael Gluck wrote:[color=blue]
    > Hi
    > I've been trying to hand code my pages, after failing in a WSYWYG
    > editor and giving up.
    > I'm almost done with the page checking, it's just i'm having a Wend
    > error
    >
    >
    > Microsoft VBScript compilation error '800a03fa'
    >
    > Expected 'Wend'
    >
    > /listing.asp, line 269
    >
    > on my page, www.tripak.me.uk/listing.asp
    >
    > I've attached the code at www.tripak.me.uk/listing.txt
    >
    >
    >
    > I believe that Originally when i used the WSYWYG I created two
    > seperate recordsets, and the two endings were
    >
    > <%
    > rsListing.Close ()
    > Set rsListing = Nothing
    > %>
    > <%
    > rsTextspec.Clos e()
    > Set rsTextspec = Nothing
    > %>
    >
    > Now i tried deleting the rsTextspec one but i still get an error with
    > the rsListing one, which is the only recordset i have left.
    >
    > Am i supposed to delete this? and close it up ealier? (line 210) and
    > how?
    >
    > I hope somone can help me.
    >
    > Raphael[/color]



    Comment

    • Tom B

      #3
      Re: VB error Expected 'Wend'

      You have a WHILE (start of a loop) without a WEND(end of a loop)
      <%
      if blnHasTextSpec = true then
      While ((Repeat1__numR ows <> 0) AND (NOT rsListing.EOF))
      %>
      <tr><td><a href="sublistin g.asp?Item_ID=< %=rsListing("It em_ID") %>"> <%
      rsListing("Text _Spec")%> </a> </td>
      <% if rsListing("lrg_ img") > "" then %>
      <td><% =rsListing("lrg _img") %> </td>
      <% end if %>
      <% if rsListing("Item _ID") > "" then %>
      <td colspan="2"><% rsListing("Item _ID") %> </td>
      <% end if %>
      <% if rsListing("Spec ific_imagesm") > "" then %>
      <td colspan="2"><% rsListing("Spec ific_imagesm") %> </td>
      <%WEND 'ADD THIS%>
      <% end if %>

      "Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
      message news:OqV0zKZYDH A.1480@tk2msftn gp13.phx.gbl...[color=blue]
      > Hi
      > I've been trying to hand code my pages, after failing in a WSYWYG editor[/color]
      and[color=blue]
      > giving up.
      > I'm almost done with the page checking, it's just i'm having a Wend error
      >
      >
      > Microsoft VBScript compilation error '800a03fa'
      >
      > Expected 'Wend'
      >
      > /listing.asp, line 269
      >
      > on my page, www.tripak.me.uk/listing.asp
      >
      > I've attached the code at www.tripak.me.uk/listing.txt
      >
      >
      >
      > I believe that Originally when i used the WSYWYG I created two seperate
      > recordsets, and the two endings were
      >
      > <%
      > rsListing.Close ()
      > Set rsListing = Nothing
      > %>
      > <%
      > rsTextspec.Clos e()
      > Set rsTextspec = Nothing
      > %>
      >
      > Now i tried deleting the rsTextspec one but i still get an error with the
      > rsListing one, which is the only recordset i have left.
      >
      > Am i supposed to delete this? and close it up ealier? (line 210) and how?
      >
      > I hope somone can help me.
      >
      > Raphael
      >
      >
      >[/color]


      Comment

      • Raphael Gluck

        #4
        Re: VB error Expected 'Wend'

        Thanks for that
        Just a little question,
        I paste the following line in

        <%WEND 'ADD THIS%>

        I tried that and i'm still getting an error
        Expected statement

        /listing.asp, line 181

        WEND 'ADD THIS
        I'm obviously supposed to insert something, but what?I'm not sure what wends
        are, and how to close themExcuse my IgnoranceRaphae l


        Comment

        • Brad

          #5
          Re: VB error Expected 'Wend'

          Here ya go... everything you need for vbscript and asp.

          Sorry! We can't seem to find the resource you're looking for




          ~Brad

          "Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
          message news:eD9REcZYDH A.2032@TK2MSFTN GP10.phx.gbl...[color=blue]
          > Thanks for that
          > Just a little question,
          > I paste the following line in
          >
          > <%WEND 'ADD THIS%>
          >
          > I tried that and i'm still getting an error
          > Expected statement
          >
          > /listing.asp, line 181
          >
          > WEND 'ADD THIS
          > I'm obviously supposed to insert something, but what?I'm not sure what[/color]
          wends[color=blue]
          > are, and how to close themExcuse my IgnoranceRaphae l
          >
          >[/color]


          Comment

          • Tom B

            #6
            Re: VB error Expected 'Wend'

            Remove that line I told you to add, I took a look, and that's not where it
            should be.

            Put it back in further down

            I STRONGLY recommend you get rid of dreamweaver until you know what's going
            on. This code is a nightmare to try and decipher.


            if blnHasTextSpec = true then
            While ((Repeat1__numR ows <> 0) AND (NOT rsListing.EOF))
            %>
            <tr><td><a href="sublistin g.asp?Item_ID=< %=rsListing("It em_ID") %>"> <%
            rsListing("Text _Spec")%> </a> </td>
            <% if rsListing("lrg_ img") > "" then %>
            <td><% =rsListing("lrg _img") %> </td>
            <% end if %>
            <% if rsListing("Item _ID") > "" then %>
            <td colspan="2"><% rsListing("Item _ID") %> </td>
            <% end if %>
            <% if rsListing("Spec ific_imagesm") > "" then %>
            <td colspan="2"><% rsListing("Spec ific_imagesm") %> </td>

            <% end if %>

            </tr>
            <%
            Repeat1__index= Repeat1__index+ 1
            Repeat1__numRow s=Repeat1__numR ows-1
            rsListing.MoveN ext()
            Wend
            else
            While ((Repeat1__numR ows <> 0) AND (NOT rsListing.EOF))
            %>
            <tr>
            <% if rsListing("Inve ntory_ID") > "" then %>
            <td><% rsListing("Inve ntory_ID") %> </td>
            <% end if %>
            <% if rslisting("prod uct_name") > "" then %>
            <td><% rsListing("Prod uct_Name") %></td>
            <% end if %>
            <% if rsListing("Desc rMetric") > "" then %>
            <td><% rsListing("Desc rMetric") %></td>
            <% end if %>
            <% if rsListing("Colo r") > "" then %>
            <td><% rsListing("Colo r") %></td>
            <% end if %>
            <% if rsListing("grad es") > "" then %>
            <td><% rsListing("Grad es") %></td>
            <% end if %>
            <% if rsListing("word s") > "" then %>
            <td><% rsListing("word s") %></td>
            <% end if %>


            </tr>
            <% rsListing.MoveN ext 'ADD THIS%>
            <%WEND 'ADD THIS%>
            </table>

            "Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
            message news:eD9REcZYDH A.2032@TK2MSFTN GP10.phx.gbl...[color=blue]
            > Thanks for that
            > Just a little question,
            > I paste the following line in
            >
            > <%WEND 'ADD THIS%>
            >
            > I tried that and i'm still getting an error
            > Expected statement
            >
            > /listing.asp, line 181
            >
            > WEND 'ADD THIS
            > I'm obviously supposed to insert something, but what?I'm not sure what[/color]
            wends[color=blue]
            > are, and how to close themExcuse my IgnoranceRaphae l
            >
            >[/color]


            Comment

            • Ray at

              #7
              Re: VB error Expected 'Wend'

              That's not really an issue in IIS 5 and over anymore.

              Ray at work

              "Andrew J Durstewitz" <adurstew@devbu ilder.org> wrote in message
              news:3f3aa26c$0 $195$75868355@n ews.frii.net...[color=blue]
              > You might want to consider doing a
              >
              > Response.Write "<td>" instead of jumping in and out of ASP with the <%
              > %>. It takes more on the processor to jump in and out like that.[/color]


              Comment

              • David Morgan

                #8
                Re: VB error Expected 'Wend'

                No it doesn't.

                "Andrew J Durstewitz" <adurstew@devbu ilder.org> wrote in message
                news:3f3aa26c$0 $195$75868355@n ews.frii.net...[color=blue]
                > You might want to consider doing a
                >
                > Response.Write "<td>" instead of jumping in and out of ASP with the <%
                > %>. It takes more on the processor to jump in and out like that.
                >
                > hth,
                > Andrew
                >
                > * * * Sent via DevBuilder http://www.devbuilder.org * * *
                > Developer Resources for High End Developers.[/color]


                Comment

                Working...