Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 21st, 2008, 04:04 AM
Registered User
 
Join Date: Dec 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to cannielynn0312 Send a message via Yahoo to cannielynn0312
Default Error type: Loop without Do

I encountered this error when i executed my code & not sure what goes wrong with my code.

Microsoft VBScript compilation (0x800A040E)
'loop' without 'do'
/EtchPMClosed/SearchSingleAsher.asp, line 516
loop

This is my whole code:
<%@ Language=VBScript%>

<%
Dim strLevelAE2
strLevelAE2= Request.QueryString("level")
Dim dateFrom
Dim dateFrom2
dateFrom2= Request.QueryString("FDate")
dateFrom=dateFrom2

Dim dateTo
Dim dateTo2
dateTo2= Request.QueryString("TDate")
dateTo=dateTo2

Dim EComment_OOS
EComment_OOS=Request.QueryString("TDate")

Dim strEquipId
strEquipId= Request.QueryString("EquipId")
'strEquipId=trim(strEquipId)

Dim strTable
strTable= Request.QueryString("tname")

Dim strOrder
strOrder = Request.QueryString("Order")
'Response.write strOrder
'response.write strEquipId

if (strEquipId <> "" and dateTo <> "" and dateFrom <> "") then

if strEquipId <> "All" then

    if Len(strEquipId) = 5 then
        'response.write "5"
            If strOrder <> "" then 'contains some text
            select case strOrder

                case "CurDate"
                    strSQL = CreateSQLASC2("CurDate")
                case "PMDate"
                    strSQL = CreateSQLASC2("PMDate")
                case "EquipID"
                    strSQL = CreateSQLASC2("EquipID")
                case "EAE"
                    strSQL = CreateSQLASC2("EAE")
                case "LastModifyDate"
                    strSQL = CreateSQLDESC2("LastModifyDate")
                case "LastModifyBy"
                    strSQL = CreateSQLASC2("LastModifyBy")
                case "Spec_Yes"
                    strSQL = CreateSQLDESC2("Spec")
                case "Spec_No"
                    strSQL = CreateSQLASC2("Spec")
                case "Comment"
                    strSQL = CreateSQLASC2("Comment")
            end select
        else
            strSQL= "SELECT * FROM tbl_SingleAsher WHERE LEFT(EquipID,5)= '" & strEquipId& "' AND DateValue(PMDate) >= #"& dateFrom &"# And DateValue(PMDate)<= #"& dateTo &"# ORDER BY CurDate DESC;"

        end if

    ElseIf Len(strEquipId) = 6 then
    'response.write "6"
                If strOrder <> "" then 'contains some text
            select case strOrder

                case "CurDate"
                    strSQL = CreateSQLASC3("CurDate")
                case "PMDate"
                    strSQL = CreateSQLASC3("PMDate")
                case "EquipID"
                    strSQL = CreateSQLASC3("EquipID")
                case "EAE"
                    strSQL = CreateSQLASC3("EAE")
                case "LastModifyDate"
                    strSQL = CreateSQLDESC3("LastModifyDate")
                case "LastModifyBy"
                    strSQL = CreateSQLASC3("LastModifyBy")
                case "Spec_Yes"
                    strSQL = CreateSQLDESC3("Spec")
                case "Spec_No"
                    strSQL = CreateSQLASC3("Spec")
                case "Comment"
                    strSQL = CreateSQLASC3("Comment")
            end select
        else
            strSQL= "SELECT * FROM tbl_SingleAsher WHERE EquipID= '" & strEquipId& "' AND DateValue(PMDate) >= #"& dateFrom &"# And DateValue(PMDate)<= #"& dateTo &"# ORDER BY CurDate DESC;"
        end if
    end if
ElseIf strEquipId = "All" then

         If strOrder <> "" then 'contains some text
            select case strOrder

                case "CurDate"
                    strSQL = CreateSQLASC("CurDate")
                case "PMDate"
                    strSQL = CreateSQLASC("PMDate")
                case "EquipID"
                    strSQL = CreateSQLASC("EquipID")
                case "EAE"
                    strSQL = CreateSQLASC("EAE")
                case "LastModifyDate"
                    strSQL = CreateSQLDESC("LastModifyDate")
                case "LastModifyBy"
                    strSQL = CreateSQLASC("LastModifyBy")
                case "Spec_Yes"
                    strSQL = CreateSQLDESC("Spec")
                case "Spec_No"
                    strSQL = CreateSQLASC("Spec")
                case "Comment"
                    strSQL = CreateSQLASC("Comment")
            end select
        else

        strSQL= "SELECT * FROM tbl_SingleAsher WHERE DateValue(PMDate) >= #"& dateFrom &"# And DateValue(PMDate)<= #"& dateTo &"# ORDER BY CurDate DESC;"

        end if

end if

else
strSQL= "SELECT * FROM tbl_Empty;"

end if

     function CreateSQLASC(strOrderByField)

        CreateSQLASC = "SELECT * FROM tbl_SingleAsher WHERE DateValue(PMDate) >= #"& dateFrom &"# And DateValue(PMDate)<= #"& dateTo &"# ORDER BY "& strOrderByField&" ASC;"
    end function

     function CreateSQLDESC(strOrderByField)

        CreateSQLDESC= "SELECT * FROM tbl_SingleAsher WHERE DateValue(PMDate) >= #"& dateFrom &"# And DateValue(PMDate)<= #"& dateTo &"# ORDER BY "& strOrderByField&" DESC;"
    end function

     function CreateSQLASC2(strOrderByField2)

        CreateSQLASC2 = "SELECT * FROM tbl_SingleAsher WHERE LEFT(EquipID,5)= '" & strEquipId& "' AND DateValue(PMDate) >= #"& dateFrom &"# And DateValue(PMDate)<= #"& dateTo &"# ORDER BY "& strOrderByField2&" ASC;"
    end function

     function CreateSQLDESC2(strOrderByField2)

        CreateSQLDESC2= "SELECT * FROM tbl_SingleAsher WHERE LEFT(EquipID,5)= '" & strEquipId& "' AND DateValue(PMDate) >= #"& dateFrom &"# And DateValue(PMDate)<= #"& dateTo &"# ORDER BY "& strOrderByField2&" DESC;"
    end function

     function CreateSQLASC3 (strOrderByField3)

        CreateSQLASC3 = "SELECT * FROM tbl_SingleAsher WHERE EquipID= '" & strEquipId& "' AND DateValue(PMDate) >= #"& dateFrom &"# And DateValue(PMDate)<= #"& dateTo &"# ORDER BY "& strOrderByField3&" ASC;"
    end function

     function CreateSQLDESC3(strOrderByField3)

        CreateSQLDESC3= "SELECT * FROM tbl_SingleAsher WHERE EquipID= '" & strEquipId& "' AND DateValue(PMDate) >= #"& dateFrom &"# And DateValue(PMDate)<= #"& dateTo &"# ORDER BY "& strOrderByField3&" DESC;"
    end function

rsCommon.CursorType = 2
rsCommon.LockType = 3
rsCommon.Open strSQL,adoCon

'rsCommon.MoveFirst()

On Error Resume Next ' If an error occurs, ignore it
rsCommon.MoveFirst()

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>+
<TITLE>view TXRF PM</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="Microsoft FrontPage 4.0" name=GENERATOR>
</head>

<BODY vLink=#8080ff aLink=#8080ff link=#8080ff bgcolor="#F0FFFF">



<FORM METHOD="POST" action= "SearchSingleAsher.asp" name=SearchTXRF>

<table width="100" border="0" align="center" cellpadding="0" cellspacing="0" height="94">
  <tr>
    <td height="59" width="983"><table border="2" width="983" cellspacing="0" cellpadding="2" bordercolor="#C0C0C0" style="border-collapse: collapse">
      <tr bgcolor="#33CC66">
        <td valign="center" align="center" colspan="61"><b>SINGLE ASHER </b> </td>
      </tr>
      <tr bgcolor="#33CC66">
        <td valign="center" align="center" rowspan="2"><b>No.</b> </td>
        <td valign="center" align="center" rowspan="2"><p style="margin-top: 0; margin-bottom: 0"><b><a href="SearchSingleAsher.asp?Order=CurDate&EquipId= <%=strEquipId%>&FDate=<%=dateFrom%>&TDate=<%=dateT o%>" class = "EquipHeader" title="order by Key-in Date">Key-in</a></b>
          <p style="margin-top: 0; margin-bottom: 0"><b><a href="SearchSingleAsher.asp?Order=CurDate&EquipId= <%=strEquipId%>&FDate=<%=dateFrom%>&TDate=<%=dateT o%>" class = "EquipHeader" title="order by Key-in Date">Date</a></b></p></td>
        <td valign="center" align="center" rowspan="2"><p style="margin-top: 0; margin-bottom: 0"><b>
        <a href="SearchSingleAsher.asp?Order=PMDate&EquipId=< %=strEquipId%>&FDate=<%=dateFrom%>&TDate=<%=dateTo %>" class = "EquipHeader" title="order by PM_Date">PM Date </a></b></p></td>
        <td valign="center" align="center" rowspan="2"><p style="margin-top: 0; margin-bottom: 0"><b>
        <a href="SearchSingleAsher.asp?Order=EquipID&EquipId= <%=strEquipId%>&FDate=<%=dateFrom%>&TDate=<%=dateT o%>" class = "EquipHeader" title="order by EquipID">EquipID </a></b></p></td>
        <td valign="center" align="center" rowspan="2"><p style="margin-top: 0; margin-bottom: 0"><b>
        <a href="SearchSingleAsher.asp?Order=EAE&EquipId=<%=s trEquipId%>&FDate=<%=dateFrom%>&TDate=<%=dateTo%>" class = "EquipHeader" title="order by EAE">PM
          Done By</a></b></p></td>
        <td valign="center" align="center" rowspan="2"><p style="margin-top: 0; margin-bottom: 0"> <b> OOS <a href="SearchSingleAsher.asp?Order=Spec_Yes&EquipId =<%=strEquipId%>&FDate=<%=dateFrom%>&TDate=<%=date To%>" class = "EquipHeader" title="order by Spec"> (Yes </a><a href="SearchSingleAsher.asp?Order=Spec_No&EquipId= <%=strEquipId%>&FDate=<%=dateFrom%>&TDate=<%=dateT o%>" class = "EquipHeader" title="order by Spec">/ No) </a></b> </p></td>

        <td valign="center" align="center" colspan="3"><b>Gas Box N2</b> </td>
        <td valign="center" align="center" colspan="3"><p style="margin-top: 0; margin-bottom: 0"> <b> Gas Box O 2</b></p></td>
        <td valign="center" align="center" colspan="3"><p style="margin-top: 0; margin-bottom: 0"><b>Gas Box CF4 </b></p></td>
        <td valign="center" align="center" colspan="3"><p style="margin-top: 0; margin-bottom: 0"><b>Gas Box H2N2</b></p></td>
               <td valign="center" align="center" colspan="3"><b>Temperature PC1 </b> </td>
               <td valign="center" align="center" colspan="3"><p style="margin-top: 0; margin-bottom: 0"><b>Temperature PC2 </b></p></td>
        <td valign="center" align="center" colspan="3"><p style="margin-top: 0; margin-bottom: 0"><b>
          Vacuum PCW Leak</b></p></td>
        <td valign="center" align="center" colspan="3"><p style="margin-top: 0; margin-bottom: 0"><b>Vacuum Noise/Vibration</b></p></td>
        <td valign="center" align="center" rowspan="2" bgcolor="#33CC66"><p style="margin-top: 0; margin-bottom: 0"> <b>DMS Documment No</b></p></td>
        <td valign="center" align="center" rowspan="2"><p style="margin-top: 0; margin-bottom: 0"><b><a href="SearchSingleAsher.asp?Order=Comment&EquipId= <%=strEquipId%>&FDate=<%=dateFrom%>&TDate=<%=dateT o%>" class = "EquipHeader" title="order by Comment">Remaarks </a></b></p></td>
        <td valign="center" align="center" rowspan="2"><p style="margin-top: 0; margin-bottom: 0"><b><a href="SearchSingleAsher.asp?Order=LastModifyDate&E quipId=<%=strEquipId%>&FDate=<%=dateFrom%>&TDate=< %=dateTo%>" class = "EquipHeader" title="order by Last Modified Date">Last
          Modified Date</a></b></p></td>
        <td valign="center" align="center" rowspan="2"><b><a href="SearchSingleAsher.asp?Order=LastModifyBy&Equ ipId=<%=strEquipId%>&FDate=<%=dateFrom%>&TDate=<%= dateTo%>" class = "EquipHeader" title="order by Last Modified By">Last
          Modified By</a></b> </td>
        <td align="center" valign="top" rowspan="2"><p style="margin-top: 0; margin-bottom: 0"> <b>
          <class = ================================================== =========="EquipmentHeader" >
          Action</b></p></td>
      </tr>
      <tr bgcolor="#33CC66">
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b> Before</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b>After</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"> <b> Action</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b> Before</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b>After</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"> <b> Action</b></p></td>
              <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b> Before</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b>After</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"> <b> Action</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b> Before</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b>After</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"> <b> Action</b></p></td>
              <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b> Before</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b>After</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"> <b> Action</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b> Before</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b>After</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"> <b> Action</b></p></td>
              <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b> Before</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b>After</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"> <b> Action</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b> Before</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"><b>After</b></p></td>
        <td valign="center" align="center"><p style="margin-top: 0; margin-bottom: 0"> <b> Action</b></p></td>
      </tr>
      <%

    if rsCommon.EOF then

    Response.write "<tr bgcolor=white>" &vbcrlf
    Response.write "<td colspan=17><b><center>"
    Response.write "No Record"
    Response.write "</center></b></td>" &vbcrlf
    Response.write "</tr>" &vbcrlf

    else
    dim i
    i =1
    Do while not rsCommon.EOF

    Response.write "<tr bgcolor=""#C0C0C0"">" &vbcrlf

    Dim numGasBoxN2Before
Dim strcolorGasBoxN2Before
numGasBoxN2Before=rsCommon("GasBoxN2Before")

    if (numGasBoxN2Before < 0.2 )then
       strcolorGasBoxN2Before="#FF0000"
       else
       strcolorGasBoxN2Before="#003399"
    end if

Dim numGasBoxN2After
Dim strcolorGasBoxN2After
numGasBoxN2After=rsCommon("GasBoxN2After")

    if (numGasBoxN2After < 0.2 )then
       strcolorGasBoxN2After="#FF0000"
       else
       strcolorGasBoxN2After="#003399"
    end if
  %>
  <td valign="Top" width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=i%></b></td>
      <%= vbcrlf %>
      <td valign="Top" width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("CurDate")%></b></td>
    <%= vbcrlf %>
      <td valign="Top" width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("PMDate")%></b></td>
    <%= vbcrlf %>
      <td valign="Top" width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("EquipID")%></b></td>
    <%= vbcrlf %>
      <td valign="Top" width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("EAE")%></b></td>
    <%= vbcrlf %>
      <td valign="Top" width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("Spec")%></b></td>
    <%= vbcrlf %>
      <td valign="Top" width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b>><%=numGasBoxN2Before%></b></td>
    <%= vbcrlf %>
         <td valign="Top" width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b>><%=numGasBoxN2After%></b></td>
    <%= vbcrlf %>
       <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("GasBoxN2Comment")%></b></td>
<%= vbcrlf %>
      <%

Dim numGasBoxO2Before
Dim strcolorGasBoxO2Before
numGasBoxO2Before=rsCommon("GasBoxO2Before")

    if (numGasBoxO2Before < 0.2 ) then
       strcolorGasBoxO2Before="#FF0000"
       else
       strcolorGasBoxO2Before="#003399"
    end if

Dim numGasBoxO2After
Dim strcolorGasBoxO2After
numGasBoxO2After=rsCommon("GasBoxO2After")

    if (numGasBoxO2After < 0.2 ) then
       strcolorGasBoxO2After="#FF0000"
       else
       strcolorGasBoxO2After="#003399"
    end if

      %>
<td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b>><%=numGasBoxO2Before%></b></td>
<%= vbcrlf %>
<td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b>><%=numGasBoxO2After%></b></td>
<%= vbcrlf %>
   <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("GasBoxO2Comment")%></b></td>
<%= vbcrlf %>
      <%
Dim numGasBoxCF4Before
Dim strcolorGasBoxCF4Before
numGasBoxCF4Before=rsCommon("GasBoxCF4Before")
    if (numGasBoxCF4Before < 0.2 ) then
       strcolorGasBoxCF4Before="#FF0000"
       else
       strcolorGasBoxCF4Before="#003399"
    end if

Dim numGasBoxCF4After
Dim strcolorGasBoxCF4After

numGasBoxCF4After=rsCommon("GasBoxCF4After")
if (numGasBoxCF4After <> "") then
    if (numGasBoxCF4After < 0.2 ) then
       strcolorGasBoxCF4After="#FF0000"
       else
       strcolorGasBoxCF4After="#003399"
end if
   %>
     <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b>><%=numGasBoxCF4Before%></b></td><%= vbcrlf %>
      <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b>><%=numGasBoxCF4After%></b></td><%= vbcrlf %>
   <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("GasBoxCF4Comment")%></b></td>
<%= vbcrlf %>

<%
Dim numGasBoxH2N2Before
Dim strcolorGasBoxH2N2Before
strcolorGasBoxH2N2Before="#003399"

numGasBoxH2N2Before=rsCommon("GasBoxH2N2Before")
if (numGasBoxH2N2Before <> "") then
    if (numGasBoxH2N2Before < 0.2 ) then
       strcolorGasBoxH2N2Before="#FF0000"
    end if
end if

Dim numGasBoxH2N2After
Dim strcolorGasBoxH2N2After
strcolorGasBoxH2N2After="#003399"

numGasBoxH2N2After=rsCommon("GasBoxH2N2After")
if (numGasBoxH2N2After <> "") then
    if (numGasBoxH2N2After < 0.2 ) then
       strcolorGasBoxH2N2After="#FF0000"
    end if
end if
   %>
     <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b>><%=numGasBoxH2N2Before%></b></td>
<%= vbcrlf %>
     <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b>><%=numGasBoxH2N2After%></b></td>
<%= vbcrlf %>
   <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("GasBoxH2N2Comment")%></b></td>
<%= vbcrlf %>
<%
Dim numTempPC1Before
Dim strcolorTempPC1Before

numTempPC1Before=rsCommon("TempPC1Before")
    if ((numTempPC1Before > 10) or (numTempPC1Before < 0))then
       strcolorTempPC1Before="#FF0000"
       else
       strcolorTempPC1Before="#003399"
end if

Dim numTempPC1After
Dim strcolorTempPC1After

numTempPC1After=rsCommon("TempPC1After")
if (numTempPC1After <> "") then
    if ((numTempPC1After > 10) or (numTempPC1After < 0)) then
       strcolorTempPC1After="#FF0000"
       else
       strcolorTempPC1After="#003399"
    end if
%>
<td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b>><%=numTempPC1Before%></b></td>
     <%= vbcrlf %>
       <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b>><%=numTempPC1After%></b></td>
     <%= vbcrlf %>
      <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("TempPC1Comment")%></b></td>
<%= vbcrlf %>

<%
Dim numTempPC2Before
Dim strcolorTempPC2Before
numTempPC2Before=rsCommon("TempPC2Before")
    if ((numTempPC2Before > 10) or (numTempPC2Before < 0 )) then
       strcolorTempPC2Before="#FF0000"
       else
       strcolorTempPC2Before="#003399"
    end if

Dim numTempPC2After
Dim strcolorTempPC2After
numTempPC2After=rsCommon("TempPC2After")
    if ((numTempPC2After > 10) or (numTempPC2After < 0)) then
       strcolorTempPC2After="#FF0000"
       else
       strcolorTempPC2After="#003399"
    end if
   %>
     <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b> ><%=numTempPC2Before%></b></td>
     <%= vbcrlf %>
       <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b> ><%=numTempPC2After%></b></td>
     <%= vbcrlf %>
           <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("TempPC2Comment")%></b></td>
<%= vbcrlf %>
 <%
Dim textrVacuumPumpPCWLeakBefore
Dim strcolorVacuumPumpPCWLeakBefore
textrVacuumPumpPCWLeakBefore=rsCommon("VacuumPumpP CWLeakBefore")

    if textrVacuumPumpPCWLeakBefore="Yes" then
            strcolorVacuumPumpPCWLeakBefore="#FF0000"
        else
        strcolorVacuumPumpPCWLeakBefore="#003399"
    end if

Dim textrVacuumPumpPCWLeakAfter
Dim strcolorVacuumPumpPCWLeakAfter

    textrVacuumPumpPCWLeakAfter=rsCommon ("VacuumPumpPCWLeakAfter")
    if textrVacuumPumpPCWLeakAfter="Yes" then
    strcolorVacuumPumpPCWLeakAfter="#FF0000"
    else
    strcolorVacuumPumpPCWLeakAfter="#003399"
    end if

   %>
     <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b> ><%=textrVacuumPumpPCWLeakBefore%></b></td>
     <%= vbcrlf %>
       <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b> ><%=textrVacuumPumpPCWLeakAfter%></b></td>
     <%= vbcrlf %>
    <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("VacuumPumpPCWLeakComment")%></b></td>
<%= vbcrlf %>

     <%
Dim textrVacuumPumpNoiseBefore
Dim strcolorVacuumPumpNoiseBefore

textrVacuumPumpNoiseBefore=rsCommon("VacuumPumpNoi seBefore")
    if textrVacuumPumpNoiseBefore="Yes" then
    strcolorVacuumPumpNoiseBefore="#FF0000"
    else
    strcolorVacuumPumpNoiseBefore="#003399"
    end if

Dim textrVacuumPumpNoiseAfter
Dim strcolorVacuumPumpNoiseAfter
strcolorVacuumPumpNoiseAfter="#003399"

textrVacuumPumpNoiseAfter=rsCommon("VacuumPumpNois eAfter")
    if textrVacuumPumpNoiseAfter="Yes" then
        strcolorVacuumPumpNoiseAfter="#FF0000"
    end if
   %>
        <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b> ><%=textrVacuumPumpNoiseBefore%></b></td>
<%= vbcrlf %>
     <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b> ><%=textrVacuumPumpNoiseAfter%></b></td>
<%= vbcrlf %>
     <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("VacuumPumpNoiseComment")%></b></td>
<%= vbcrlf %>
      <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("dms_version")%></b></td>
    <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("Remarks")%></b></td>
    <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("LastModifyDate")%></b></td>
    <td valign=top width="64" height=21 align="center" bgcolor="#F0FFFF" style="border-style: solid; border-color: #C0C0C0" ><b><%=rsCommon("LastModifyBy")%></b></td>
    <td valign=top width="71" height=21 align="center" >
    <table width="23%" border="0">
          <tr>
            <td width="60%"><% if strLevelAE2="2" then %>
                <div align="center"><a href="EditSingleAsherCheckSheet.asp?PMID=<%=rsComm on("PMID")%>&EquipId=<%=strEquipId%>&FDate=<%=date From%>&TDate=<%=dateTo%>&UserLogin=<%=strUserName% >" class="SINGLEASHER" title="Edit record"> <img src='./images/Modify.gif' border=0 alt='edit' width="12" height="15"></a> </div>
            <td width="18%">&nbsp;</td>
            <td valign=center width="22%"><a href="DeleteSingleAsherCheckSheet.asp?PMID=<%=rsCo mmon("PMID")%>&EquipId=<%=strEquipId%>&FDate=<%=da teFrom%>&TDate=<%=dateTo%>&UserLogin=<%=strUserNam e%>" class="SINGLEASHER"> <img src='./images/Delete.gif' border=0 alt='Delete' width="12" height="15"></a>
                <% end if %> </td>
          </tr>
        </table>
        <%= vbcrlf %>
          <%
'complete the above tasks, and move to the next record in the recordset

            rsCommon.MoveNext
            i=i+1
            loop

'We then need to close the database, and set everything to nothing.

            rsCommon.Close
            Set rsCommon=Nothing
%>
    <tr>
      <% End If%>
    </tr>
    </table></td>
    <td valign="top" height="59" width="50"> </td>
  </tr>
</table>
</form>

</BODY>
 
Old February 21st, 2008, 09:15 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I don't have the time to read through all of your code. Couple of things, when you reply to this post, post the code from on and around line 518 (I imagine that code will have to do with looping through a record set) and secondly this error normally appears when you have logic that looks similar to this code:

Do While Not rs.EOF
If <condtion>
   Do something
Loop
End if

Notice that Loop exists inside of the if statement. If you tried to run this code you would get the same error.

hth.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
hi i got runtime error 13 Type Mismatch error sriharsha345 Access VBA 2 February 21st, 2008 09:30 AM
loop error crmpicco Classic ASP Databases 7 March 4th, 2005 10:59 AM
Data Type error but it is the correct type Mitch SQL Server 2000 2 March 19th, 2004 11:31 AM
'loop' without 'do' error! tjh205 Classic ASP Basics 3 January 22nd, 2004 07:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.