davidjennings 0 Junior Poster in Training

The following code is producing this error Microsoft VBScript compilation error 800a03f6 Expected End
followed by /stock/availability-quick/availability2.asp, line 130

I think it is a if else error. I have looked over the code and i don't see the error and would benefit from an expert pair of eyes to look over it.

Thanks in advance

David

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../includes/functions/insphire.asp"-->
<!--#include file="../../includes/functions/logaccess.asp"-->
<!--#include file="../../includes/functions/stock.asp"-->
<%
    if request("Allow") = "f875eba08594178509bd3482dc0294" then
        ' security check passed
%>
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
                <head>
                    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
                    <title>Administration - Stock - Status</title>
                </head>
                <body>

                <%
                    if not rowAuto.eof then
                        ' automatic stock take found
                %>

                <table cellspacing="3" class="mbottom new" width="100%">
                    <tr>
                        <th width="33%">Date</th>
                        <th width="33%">Status</th>
                        <th width="43%">Status Information</th>
                    </tr>
                <%
                        do while not rowAuto.eof
                            ' loop through automatic stock take
                            StatusInfo = "Available"
                            StatusText = rowAuto("StockTakeDepot") & "&nbsp;"

                            if rowAuto("StockTakeStatus") = "1" then
                                ' item on hire
                                StatusInfo = "On Hire"
                                StatusText = rowAuto("StockTakeContract") & ", " & rowAuto("StockTakeCompany")
                            end if
                %>
                    <tr>
                        <td><%= rowAuto("StockTakeDate") %></td>
                        <td><%= StatusInfo %></td>
                        <td><%= StatusText %></td>
                    </tr>
                <%
                            rowAuto.movenext
                        loop
                %>
                </table>
                <%
                    else
                        ' no automatic stock take found
                %>
                <h2 class="centre mbottom">There are currently no automatic stock takes for <%= request("ItemNo") %>.</h2>
                <%
                    end if

                    if not rowManual.eof then
                        ' manual stock take found
                %>
                <h2 class="mbottom mtop">Manual Stock Records for <%= request("ItemNo") %></h2>
                <table cellspacing="3" class="mbottom new" width="100%">
                  <tr>
                    <th width="15%">Date</th>
                    <th width="10%">Taken By</th>
                    <th width="10%">In Stock?</th>
                    <th width="10%">Depot</th>
                    <th width="55%">Notes</th>
                  </tr>
                <%
                    do while not rowManual.eof
                        ' loop through manual stock take
                        StatusInfo = "Yes"
                        StatusText = rowManual("StockTakingActualDepot") & "&nbsp;"
                            if rowManual("StockTakingActualStatus") = "0" then
                                ' item on hire
                                StatusInfo = "No"
                            end if
                %>
                  <tr>
                    <td><%= rowManual("StockTakingDate") %></td>
                    <td><%= rowManual("StockTakingUser") %></td>
                    <td><%= StatusInfo %></td>
                    <td><%= StatusText %></td>
                    <td><%= rowManual("StockTakingNotes") %></td>
                  </tr>
                <%
                            rowManual.movenext
                        loop
                %>
                </table>
                <%
                    else
                        ' no manual stock take found
                %>

               <h2 class="centre mbottom">There are currently no manual stock takes for <%= request("ItemNo") %>.</h2>
                <%
                    end if

                    if not rowNote.eof then
                        ' notes found
                %>

    </body>
</html>


            <%
                else
                    ' security check failed
                    dim CurrentDate, dbLog, IPAddress, logSQL

                    CurrentDate = year(date) & "-" & month(date) & "-" & day(date) & " " & formatdatetime(now(), 3)
                    IPAddress = request.servervariables("HTTP_X_FORWARDED_FOR")

                    if IPAddress = "" then
                        ' acquire ip address
                        IPAddress = request.servervariables("REMOTE_ADDR")
                    end if

                    logSQL = "INSERT INTO LogIP (LogIPDate, LogIPAddress, LogIPPage) VALUES ('" & CurrentDate & "', '" & IPAddress & "', 'stock/availability-quick/availability_report.asp')"
                    set dbLog = ExecuteSQL2(logSQL)
                end if

            %>