Help! Please tell me if this asp code has any problems ?

Discussion in 'C#' started by mike2016, Feb 5, 2010.

  1. #1
    Help please! can someone take a look if there's anything wrong with this piece of code? it's causing a problem on our ecommerce site

    <%
    ':: Everest E-Commerce Advanced Edition
    ':: Copyright © 1999 - 2005 iCode, Inc. All rights reserved.
    ':: Template: AMAZING
    %>
    <%
    Dim rsCustomWebsites

    On Error Resume Next

    '*** rsCustomWebsites recordset will have the information asssociated with the web tracked item.
    '*** Caching implementation for GetCustomTrackingForWebSites begins
    If bEnableCache then
    If Application("appCustomTrackingForWebSites")<>"" then
    Set rsCustomWebsites = GetFromCache("appCustomTrackingForWebSites",true)
    Else
    Set rsCustomWebsites = objStoreFront.GetCustomTrackingForWebSites(sConnectionString,sCartId)
    If Err.number <> 0 Then
    Call ErrorTrap(Err.description)
    End if
    Call AddToCache("appCustomTrackingForWebSites",rsCustomWebsites,true)
    End if
    Else
    Set rsCustomWebsites = objStoreFront.GetCustomTrackingForWebSites(sConnectionString,sCartId)
    End If
    If Err.number <> 0 Then
    Call ErrorTrap(Err.description)
    End if
    '*** Caching implementation for GetCustomTrackingForWebSites begins

    If Not rsCustomWebsites.Eof Then%>
    <table border="0">
    <tr>
    <td width=100%>&nbsp;
    <%'*** Display the notes associated for the web tracked item. Javascript is used to show the items on mouse move.
    DO While Not rsCustomWebsites.Eof%>
    <a href="websiteinfo.asp?fc=<%=Trim(rsCustomWebsites("CHOI_CODE"))%>"><%=rsCustomWebsites("CHOICE_NAME")%></a>
    <%rsCustomWebsites.Movenext
    If Not rsCustomWebsites.Eof Then%>
    &nbsp;|&nbsp;
    <%End If
    Loop%>
    </td>
    </tr>
    <tr><td width=100% height=10></td></tr>
    </table>
    <%End If%>
     
    mike2016, Feb 5, 2010 IP
  2. RonBrown

    RonBrown Well-Known Member

    Messages:
    934
    Likes Received:
    55
    Best Answers:
    4
    Trophy Points:
    105
    #2
    Why not switch

    "On Error Resume Next"

    to

    "On Error Goto 0"

    or comment-out "On Error Resume Next"

    That way you will get a meaningful error message that might identify where the problem is.
     
    Last edited: Feb 6, 2010
    RonBrown, Feb 6, 2010 IP
  3. nadiralishah_webexpert

    nadiralishah_webexpert Guest

    Messages:
    229
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i dont see any syntax errors.. must be some logic problem and on run time while working with data dynamically, objects are having some unexpected data causing error, u will need to debug carefully..
     
    nadiralishah_webexpert, Feb 7, 2010 IP
  4. mike2016

    mike2016 Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    that's what has been bugging me, this file causes our ecomm site to have problems with certain product displays... what kind of tool is there that i can trace the scripts?
     
    mike2016, Feb 7, 2010 IP
  5. nadiralishah_webexpert

    nadiralishah_webexpert Guest

    Messages:
    229
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    is there any error coming on browser, what is that error if any? or just funcionally it is not giving results what you want.
     
    nadiralishah_webexpert, Feb 7, 2010 IP
  6. mike2016

    mike2016 Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    the browser doesn't show any error at all, it's just one function is not giving the result...

    to be exact, it's the multiple option for certain products not changing to the correct item code when user makes a selection
     
    mike2016, Feb 7, 2010 IP