Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Expected statement error

    This seems to be a common error, but I can't seem to solve it no matter what I do!

    A friend who says he opened the file, changed the company's mailing address, and now the page is returning this error. I don't know anything about asp, but I'm used to hunting down syntax errors and other accidental screwups in other languages, and I can't find anything obvious. If someone could help me figure this out, I'd be enormously grateful.

    Here's what I've got:

    Code:
    <html xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:w="urn:schemas-microsoft-com:office:word"
    xmlns="http://www.w3.org/TR/REC-html40">
    
    <head>
    <meta http-equiv=Content-Type content="text/html; charset=us-ascii">
    <meta name=ProgId content=Word.Document>
    <meta name=Generator content="Microsoft Word 11">
    <meta name=Originator content="Microsoft Word 11">
    <link rel=File-List href="printinvoice_files/filelist.xml">
    <title>Invoice!!</title>
    <!--[if gte mso 9]><xml>
     <o:DocumentProperties>
      <o:Revision>2</o:Revision>
      <o:TotalTime>1</o:TotalTime>
      <o:Created>2010-11-23T04:59:00Z</o:Created>
      <o:LastSaved>2010-11-23T05:00:00Z</o:LastSaved>
      <o:CharactersWithSpaces>685</o:CharactersWithSpaces>
      <o:Version>11.9999</o:Version>
     </o:DocumentProperties>
    </xml><![endif]--><!--[if gte mso 9]><xml>
     <w:WordDocument>
      <w:Zoom>75</w:Zoom>
      <w:SpellingState>Clean</w:SpellingState>
      <w:GrammarState>Clean</w:GrammarState>
      <w:ValidateAgainstSchemas/>
      <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
      <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
      <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
      <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
     </w:WordDocument>
    </xml><![endif]--><!--[if gte mso 9]><xml>
     <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
     </w:LatentStyles>
    </xml><![endif]-->
    <link rel=Stylesheet type="text/css" media=all href="include/viberider.css">
    <link rel=Stylesheet type="text/css" media=all href="include/js/menu.css">
    <style>
    <!--
     /* Style Definitions */
     p.MsoNormal, li.MsoNormal, div.MsoNormal
            {mso-style-parent:"";
            margin:0in;
            margin-bottom:.0001pt;
            mso-pagination:widow-orphan;
            font-size:12.0pt;
            font-family:"Times New Roman";
            mso-fareast-font-family:"Times New Roman";}
    p
            {font-size:12.0pt;
            font-family:"Times New Roman";
            mso-fareast-font-family:"Times New Roman";}
    p.style01, li.style01, div.style01
            {mso-style-name:style01;
            font-size:8.5pt;
            mso-fareast-font-family:"Times New Roman";}
    p.style1, li.style1, div.style1
            {mso-style-name:style1;
            font-size:8.5pt;
            mso-fareast-font-family:"Times New Roman";}
    p.style2, li.style2, div.style2
            {mso-style-name:style2;
            font-size:8.5pt;
            mso-fareast-font-family:"Times New Roman";}
    p.style3, li.style3, div.style3
            {mso-style-name:style3;
            font-size:8.5pt;
            mso-fareast-font-family:"Times New Roman";}
    p.textlinks, li.textlinks, div.textlinks
            {mso-style-name:textlinks;
            font-size:8.5pt;
            mso-fareast-font-family:"Times New Roman";}
    p.vibecopy, li.vibecopy, div.vibecopy
            {mso-style-name:vibecopy;
            font-size:8.5pt;
            mso-fareast-font-family:"Times New Roman";}
    p.vibeselect, li.vibeselect, div.vibeselect
            {mso-style-name:vibeselect;
            font-size:8.5pt;
            mso-fareast-font-family:"Times New Roman";}
    p.m0l0iout, li.m0l0iout, div.m0l0iout
            {mso-style-name:m0l0iout;
            font-size:9.0pt;
            mso-fareast-font-family:"Times New Roman";}
    p.m0l0iover, li.m0l0iover, div.m0l0iover
            {mso-style-name:m0l0iover;
            font-size:9.0pt;
            mso-fareast-font-family:"Times New Roman";}
    p.m0l0oout, li.m0l0oout, div.m0l0oout
            {mso-style-name:m0l0oout;
            font-size:12.0pt;
            font-family:"Times New Roman";
            mso-fareast-font-family:"Times New Roman";}
    p.m0l0oover, li.m0l0oover, div.m0l0oover
            {mso-style-name:m0l0oover;
            font-size:12.0pt;
            font-family:"Times New Roman";
            mso-fareast-font-family:"Times New Roman";}
    p.m0l1iout, li.m0l1iout, div.m0l1iout
            {mso-style-name:m0l1iout;
            font-size:9.0pt;
            mso-fareast-font-family:"Times New Roman";}
    p.m0l1iover, li.m0l1iover, div.m0l1iover
            {mso-style-name:m0l1iover;
            font-size:9.0pt;
            mso-fareast-font-family:"Times New Roman";}
    p.m0l1oout, li.m0l1oout, div.m0l1oout
            {mso-style-name:m0l1oout;
            font-size:12.0pt;
            font-family:"Times New Roman";
            mso-fareast-font-family:"Times New Roman";}
    p.m0l1oover, li.m0l1oover, div.m0l1oover
            {mso-style-name:m0l1oover;
            font-size:12.0pt;
            font-family:"Times New Roman";
            mso-fareast-font-family:"Times New Roman";}
    p.style4, li.style4, div.style4
            {mso-style-name:style4;
            mso-margin-top-alt:auto;
            margin-right:0in;
            mso-margin-bottom-alt:auto;
            margin-left:0in;
            mso-pagination:widow-orphan;
            font-size:7.5pt;
            font-family:"Times New Roman";
            mso-fareast-font-family:"Times New Roman";
            color:red;}
    p.style5, li.style5, div.style5
            {mso-style-name:style5;
            mso-margin-top-alt:auto;
            margin-right:0in;
            mso-margin-bottom-alt:auto;
            margin-left:0in;
            mso-pagination:widow-orphan;
            font-size:9.0pt;
            font-family:"Times New Roman";
            mso-fareast-font-family:"Times New Roman";}
    span.style51
            {mso-style-name:style51;
            mso-ansi-font-size:9.0pt;
            mso-bidi-font-size:9.0pt;}
    span.GramE
            {mso-style-name:"";
            mso-gram-e:yes;}
    @page Section1
            {size:8.5in 11.0in;
            margin:1.0in 1.25in 1.0in 1.25in;
            mso-header-margin:.5in;
            mso-footer-margin:.5in;
            mso-paper-source:0;}
    div.Section1
            {page:Section1;}
    -->
    </style>
    <!--[if gte mso 10]>
    <style>
     /* Style Definitions */
     table.MsoNormalTable
            {mso-style-name:"Table Normal";
            mso-tstyle-rowband-size:0;
            mso-tstyle-colband-size:0;
            mso-style-noshow:yes;
            mso-style-parent:"";
            mso-padding-alt:0in 5.4pt 0in 5.4pt;
            mso-para-margin:0in;
            mso-para-margin-bottom:.0001pt;
            mso-pagination:widow-orphan;
            font-size:10.0pt;
            font-family:"Times New Roman";
            mso-ansi-language:#0400;
            mso-fareast-language:#0400;
            mso-bidi-language:#0400;}
    </style>
    <![endif]-->
    <script language="JavaScript">
    function MM_openBrWindow(theURL,winName,features)
    {
     features=features + ',top='+(screen.height/2-176)+',left='+(screen.width/2-276);
     newWin=window.open(theURL,winName,features);
     newWin.focus();
    }
    
    function del_onclick()
    {
    if(!confirm("You are about to delete a message. Are you sure??"))
    return false
    }
    </script>
    </head>
    
    <body lang=EN-US style='tab-interval:.5in' topmargin=0>
    
    <div class=Section1>
    
    <div align=center>
    
    <table class=MsoNormalTable border=0 cellpadding=0 width="75%"
     style='width:75.0%;mso-cellspacing:1.5pt'>
     <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
      <td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal align=center style='text-align:center'><strong><span
      style='font-size:9.0pt'>S.L. SPECIALTIES</span></strong><b><span
      style='font-size:9.0pt'><br>
      
      <strong>Phone # (111) 111-1111 Fax # (111) 111-1111 </strong><br>
      <strong>www.viberider.com</strong></span></b></p>
      </td>
     </tr>
     <tr style='mso-yfti-irow:1'>
      <td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal>&nbsp;</p>
      </td>
     </tr>
     <tr style='mso-yfti-irow:2'>
      <td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal align=center style='text-align:center'><strong><u>SHIPPING
      INVOICE</u></strong></p>
      </td>
     </tr>
     <tr style='mso-yfti-irow:3'>
      <td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal>&nbsp;</p>
      </td>
     </tr>
     <tr style='mso-yfti-irow:4'>
      <td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
      <p align=right style='text-align:right'><strong>ORDERED:</strong> <%=comRS("orderdate")%><br>
      <strong>SHIPPED:</strong> <%
              if comRS("shipped")="yes" then
                      response.write "Yes: " & comRS("shipdate")
              else
                      response.write "No"
              end if
              %></p>
      </td>
     </tr>
     <tr style='mso-yfti-irow:5'>
      <td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal>&nbsp;</p>
      </td>
     </tr>
     <tr style='mso-yfti-irow:6'>
      <td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal><strong>SHIP TO: </strong></p>
      </td>
     </tr>
     <tr style='mso-yfti-irow:7'>
      <td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
      <p><%=comRS("f3")%><br>
      <br>
      <%=comRS("fname") & " " & comRS("lname")%><br>
      <%=comRS("address") & "<br>" & comRS("address2")%><%=comRS("city")%>, <%=comRS("state")%>&nbsp;
      <%=comRS("zip") & ", " & comRS("country")%></p>
      <p>CONTACT # <%=comRS("contactno")%></p>
      </td>
     </tr>
     <tr style='mso-yfti-irow:8'>
      <td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal>&nbsp;</p>
      </td>
     </tr>
     <tr style='mso-yfti-irow:9'>
      <td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
      <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 width="100%"
       style='width:100.0%;mso-cellspacing:0in;border:outset #666666 1.0pt;
       mso-border-alt:outset #666666 .75pt'>
       <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
        <td width="71%" style='width:71.0%;border:inset #666666 1.0pt;mso-border-alt:
        inset #666666 .75pt;padding:.75pt .75pt .75pt .75pt'>
        <p class=MsoNormal><strong>DESCRIPTION</strong></p>
        </td>
        <td width="14%" nowrap style='width:14.0%;border:inset #666666 1.0pt;
        mso-border-alt:inset #666666 .75pt;padding:.75pt .75pt .75pt .75pt'>
        <p class=MsoNormal><strong>AMOUNT $USD </strong></p>
        </td>
        <td width="15%" nowrap style='width:15.0%;border:inset #666666 1.0pt;
        mso-border-alt:inset #666666 .75pt;padding:.75pt .75pt .75pt .75pt'>
        <p class=MsoNormal><strong>TOTAL $USD </strong></p>
        </td>
       </tr>
       <%
              sh=0
              if comRS("qty")>=1 then
                    '//////////////////////////////////////
                    cntry = trim(comRS("country"))
    
                    getSHSQL = "SELECT CT_SHCharges FROM VIBERIDER_ShippingHandlingTable WHERE CT_PayPalCID = '"&cntry&"'"
                    Set getSHRS = Server.CreateObject("ADODB.Recordset")
                    getSHRS.Open getSHSQL,vibeConn
                    
                    If Not getSHRS.EOF Then
                    
                            SH = trim(getSHRS(0))
                            
                    Else
                    
                            Set othSH = vibeConn.execute("SELECT CT_SHCharges FROM VIBERIDER_ShippingHandlingTable WHERE CT_PayPalCID = 'OTHER'")
                            
                            If Not othSH.EOF Then
                            
                                    SH = trim(othSH(0))
                                    
                            End If
                            
                            getSHRS.Close
                            
                    End If
                    
                    
                    '////////////////////////////////////////
              
              %>
       <tr style='mso-yfti-irow:1'>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%=comRS("qty")%>
        <p class=MsoNormal>VIBE-RIDER<o:p></o:p></p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%
                                    price=comRS("price1") '-comRS("discount")
                                    response.Write formatnumber(price,2)
                                    price=price '*comRS("qty")
                                    %>
        <p class=MsoNormal align=right style='text-align:right'><o:p>&nbsp;</o:p></p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%=formatnumber(price,2)%>
        <p class=MsoNormal align=right style='text-align:right'><o:p>&nbsp;</o:p></p>
        </td>
       </tr>
       <% end if %><% if comRS("unit")>=1 then
                    sh=sh+7
               %>
       <tr style='mso-yfti-irow:2'>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%=comRS("unit")%>
        <p class=MsoNormal>Controller box <o:p></o:p></p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%
                                    price2=comRS("price2")
                                    response.Write formatnumber(price2,2)
                                    price2=price2 '*comRS("unit")
                                    %>
        <p class=MsoNormal align=right style='text-align:right'><o:p>&nbsp;</o:p></p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%=formatnumber(price2,2)%>
        <p class=MsoNormal align=right style='text-align:right'><o:p>&nbsp;</o:p></p>
        </td>
       </tr>
       <% end if %><% if comRS("stims")>=1 then
                            sh=sh+7
               %>
       <tr style='mso-yfti-irow:3'>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%=comRS("stims")%>
        <p class=MsoNormal>Vibrator <o:p></o:p></p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%
                                    price3=comRS("price3")
                                    response.Write formatnumber(price3,2)
                                    price3=price3 '*comRS("stims")
                                    %>
        <p class=MsoNormal align=right style='text-align:right'><o:p>&nbsp;</o:p></p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%=formatnumber(price3,2)%>
        <p class=MsoNormal align=right style='text-align:right'><o:p>&nbsp;</o:p></p>
        </td>
       </tr>
       <% end if %><% if comRS("seatplug")>=1 then %>
       <tr style='mso-yfti-irow:4'>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%=comRS("seatplug")%>
        <p class=MsoNormal>Seat Plug <o:p></o:p></p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%
                                    price4=comRS("price4")
                                    response.Write formatnumber(price4,2)
                                    price4=price4 '*comRS("seatplug")
                                    %>
        <p class=MsoNormal align=right style='text-align:right'><o:p>&nbsp;</o:p></p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%=formatnumber(price4,2)%>
        <p class=MsoNormal align=right style='text-align:right'><o:p>&nbsp;</o:p></p>
        </td>
       </tr>
       <% end if %>
       <tr style='mso-yfti-irow:5'>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'>
        <p class=MsoNormal>SHIPPING &amp; HANDLING<o:p></o:p></p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%=formatnumber(comRS("f1"),2)%>
        <p class=MsoNormal align=right style='text-align:right'><o:p>&nbsp;</o:p></p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'><%=formatnumber(comRS("f1"),2)%>
        <p class=MsoNormal align=right style='text-align:right'><o:p>&nbsp;</o:p></p>
        </td>
       </tr>
       <tr style='mso-yfti-irow:6'>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'>
        <p class=MsoNormal>&nbsp;</p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'>
        <p class=MsoNormal align=right style='text-align:right'>&nbsp;</p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'>
        <p class=MsoNormal align=right style='text-align:right'>&nbsp;</p>
        </td>
       </tr>
       <tr style='mso-yfti-irow:7;mso-yfti-lastrow:yes'>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'>
        <p class=MsoNormal><u>TOTAL</u></p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'>
        <p class=MsoNormal align=right style='text-align:right'>&nbsp;<o:p></o:p></p>
        </td>
        <td style='border:inset #666666 1.0pt;mso-border-alt:inset #666666 .75pt;
        padding:.75pt .75pt .75pt .75pt'>
        <p class=MsoNormal align=right style='text-align:right'><o:p>&nbsp;</o:p></p>
        </td>
       </tr>
       <%=formatnumber(price+price2+price3+price4+comRS("f1"),2)%>
      </table>
      <p class=MsoNormal><o:p></o:p></p>
      </td>
     </tr>
     <tr style='mso-yfti-irow:10'>
      <td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal>&nbsp;</p>
      </td>
     </tr>
     <tr style='mso-yfti-irow:11'>
      <td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal align=center style='text-align:center'>PAID: <br>
      <%=comRS("orderdate")%>TO: &nbsp;V-R / S.L. SPECIALTIES<br>
      <%
            if comRS("web")="yes" then
            %>WEB<br>
      PAY PAL <% elseif comRS("web")="cc" then %>WEB<br>
      Credit Card <% else %>Tele </p>
      <% end if %></td>
     </tr>
     <tr style='mso-yfti-irow:12'>
      <td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
      <p class=style4><strong><u>&lt;&lt;&lt;&lt;&lt;&lt;&lt;<span class=GramE>,ATTENTION</span>&gt;&gt;&gt;&gt;&gt;&gt;&gt;
      </u></strong><br>
      RECOMMENDED USAGE IS<br>
      15 TO 20 MINUTE INTERVALS.</p>
      </td>
     </tr>
     <tr style='mso-yfti-irow:13'>
      <td width="40%" style='width:40.0%;padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal>&nbsp;</p>
      </td>
      <td width="60%" style='width:60.0%;padding:.75pt .75pt .75pt .75pt'>
      <p class=style5>30 DAY TERM MONEY BACK GUARANTEE (RESELLABLE
      CONDITION)……</p>
      <p class=MsoNormal><span class=style51><span style='font-size:9.0pt'>AND A
      90-DAY LIMITED WARRANTY OR LONGER</span></span></p>
      </td>
     </tr>
     <tr style='mso-yfti-irow:14;mso-yfti-lastrow:yes'>
      <td style='padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal align=center style='text-align:center'><o:p>&nbsp;</o:p></p>
      </td>
      <td style='padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal><u><br>
      </u><span class=style51><u><span style='font-size:9.0pt'>SHIPPING DEPT.:</span></u></span><span
      style='font-size:9.0pt'><br>
      <span class=style51>S.L. SPECIALTIES</span><br>
      <span class=style51>ADDRESS BLAH BLAH</span><br>
      <span class=style51>CITY STATE STUFF</span></span></p>
      </td>
     </tr>
    </table>
    </div>
    <p class=MsoNormal><o:p>&nbsp;</o:p></p>
    <% end if %>
    </div>
    </body>
    
    </html>

    The error that's being returned is:

    Code:
    Microsoft VBScript compilation error '800a0400'
    
    Expected statement
    
    printinvoice.asp, line 503
    
    end if
    ^
    Line 503 is the very last end if. Please, please help!

  • #2
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Update: The file seems to be missing the comRS populate code. I found what is hopefully duplicate code in another file:
    Code:
    <%
    comSQL = "SELECT * FROM orders where oid=" & request("id") & " ORDER BY oid"
    Set comRS = Server.CreateObject("ADODB.Recordset")
    'comRS.CursorLocation = 3	'adUseClient
    'comRS.CursorType = 3		'adOpenStatic
    'comRS.ActiveConnection = vibeConn2
    comRS.Open comSQL,vibeConn2,1,3
    
    
    
    
    If not comRS.eof Then
    
    	if request("edit")="yes" then
    	'/////////////////////////////////////////////////////
    		comRS("f3")=request("company")
    		comRS("fname")=request("fname")
    		comRS("lname")=request("lname")
    		comRS("address")=request("add1")
    		comRS("address2")=request("add2")
    		comRS("city")=request("city")
    		comRS("state")=request("state")
    		comRS("zip")=request("zip")
    		comRS("country")=request("country")
    		comRS("contactno")=request("contactno")
    		comRS("qty")=request("qty")
    		comRS("price1")=request("price1")
    		comRS("seat")=request("seat")
    		comRS("code")=request("code")
    		comRS("discount")=request("discount")
    		comRS("unit")=request("unit")
    		comRS("price2")=request("price2")
    		comRS("stims")=request("stims")
    		comRS("price3")=request("price3")
    		comRS("seatplug")=request("seatplug")
    		comRS("price4")=request("price4")
    		comRS("engrave")=request("engrave")
    		comRS("tele")=request("tele")
    		comRS("web")=request("web")
    		comRS("event")=request("event")
    		comRS("year")=request("year")
    		comRS("make")=request("make")
    		comRS("model")=request("model")
    		comRS("referred")=request("referred")
    		comRS("free")=request("free")
    		if  isdate(request("orderdate")) then
    			comRS("orderdate")=request("orderdate")
    		end if
    		comRS("shipped")=request("shipped")
    		if  isdate(request("shipdate")) then
    			comRS("shipdate")=request("shipdate")
    		else
    			'comRS("shipdate")=""
    		end if
    		comRS("f1")=request("shippinga")
    		comRS("f2")=request("shippingm")
    		comRS.update
    	'/////////////////////////////////////////////////////
    	%>
    How can I use this to make my original file work?

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,447
    Thanks
    76
    Thanked 4,372 Times in 4,337 Posts
    All that error means is that you have one too many END IF's for the number of IF's you have.

    And, indeed, when I scanned for "if", that is true.

    And, yes, the code seems to be trying to use comrs even though it never declares or initializes that recordset, so I agree that it seems to be missing code. But I don't know if that code in your second post is correct for the page in the first post. It seems to be for another purpose, for saving edits from a prior page instead of just pulliing up the data for one record.

    I hate to say it, but it looks like your friend totally screwed up the page.

    You don't have a backup copy of the code before he mucked with it?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah, I agree with you. I'm beginning to come around to that conclusion.

    No, I've had him search for any older files on his computers that he can, but he doesn't have anything older than that edit. Which absolutely sucks. I guess he's (hopefully) learned his lesson about backing up his files. Seriously.

    So.....short of rebuilding everything from scratch, there aren't any real solutions, are there?

  • #5
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,447
    Thanks
    76
    Thanked 4,372 Times in 4,337 Posts
    I could *guess* what code is needed to restore comrs, but who knows if that is the only code he destroyed? You could spend many hours restoring comrs only to discover he also wiped out some of the major logic of the page.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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