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 4 of 4
  1. #1
    New Coder
    Join Date
    Dec 2011
    Posts
    29
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Is There any debugging tools for ASP

    Please tell me is there any debugging tools are there for ASP
    and how to debug the following code.


    If rstr("action") = "save" Then 'FEE_ADDRECIEPT
    on error resume next
    Conn.beginTrans

    strDescription = rform("strDescription")
    strBusDescription = rform("strBusDescription")
    strExamFeeDescription = rform("strExamFeeDescription")
    intTotalBusAmount = Trim(rform("intTotalBusAmount"))
    intBusDiscount = 0
    If Trim(rform("floatBusDiscount")) <> "" then
    intBusDiscount = Trim(rform("floatBusDiscount"))
    End If
    intExamFeeDiscount = 0
    If Trim(rform("floatExamFeeDiscount")) <> "" then
    intExamFeeDiscount = Trim(rform("floatExamFeeDiscount"))
    End if


    rsTemp.open "EXEC FEE_GetFeeTypeByClassId "&intClass_id,conn,3,3
    If rsTemp.recordcount > 0 Then
    If strDescription <> "" and rform("floatPayingAmount") <> "" then
    intDiscount = 0
    If Trim(rform("floatDiscount")) <> "" then
    intDiscount = Trim(rform("floatDiscount"))
    End If

    strSQL = ""
    strSQL = "AllFEE_ADDRECIEPT '"&strDescription&"','"&rform("floatPayingAmount")&"',"&intStudnetId&",6,'"&getLocalDateTime()&"',"& intDiscount&",'"&strBusDescription&"','"&intTotalBusAmount&"',"&intBusDiscount&",'"&strExamFeeDescri ption&"','"&rform("floatExamFeePayingAmount")&"',"&intExamFeeDiscount&"; SELECT @@IDENTITY AS NewID; "
    Set rs = Conn.Execute(strSQL)
    Call checkDBError(strSQL)
    intReceiptId = rs.Fields("NewID").value
    Set rs = Nothing
    strSQL = ""
    End if

    while not rsTemp.EOF
    If Trim(rform("floatDBAmount"&rsTemp("FeeType_Id"))) <> Trim(rform("floatAmount"&rsTemp("FeeType_Id"))) Then
    intAmount = Trim(rform("floatAmount"&rsTemp("FeeType_id"))) - Trim(rform("floatDBAmount"&rsTemp("FeeType_id")))
    strSQL = strSQL & "INSERT INTO TBLFEE (Student_Id, Class_Id, Section_id, FY_Id, Feetype_Id,Description,Amount, Receipt_id,date) VALUES ("&intStudnetId&","&intClass_id&","&intSectionid&","&intFYId&","&rsTemp("FeeType_Id")&",'"&strDescri ption&"',"&intAmount&","& intReceiptId &",'"& getLocalDateTime() &"');"
    response.write("FEE Inserted Successfully")
    'print sql
    'response.end
    End if
    rsTemp.movenext
    Wend
    End If
    rsTemp.close
    If Len(trim(request("strData"))) > 0 Then


    dimArr = split(trim(request("strData")),"||_||")
    For i = LBound(dimArr) to UBound(dimArr)
    strSQL = strSQL & "INSERT INTO TBLBUSFEE (Student_Id, Class_Id, Section_Id, FY_ID,Area_Id,Month_Id,Amount, Date_Paid, Receipt_Id, UID) VALUES("& intStudnetId & "," & intClass_id & "," & intSectionid & "," & intFYId & "," & intAreaId & "," & split(dimArr(i),"|_|")(0) & "," & split(dimArr(i),"|_|")(1) & ",'" & getLocalDateTime & "', "&intReceiptId&", "&session("DID")&"); "

    response.write("BusFee Inserted Successfully")
    Next

    If Len(strSQL) > 0 Then
    conn.execute (strSQL)
    Call checkDBError(strSQL)

    End if

    End If

    rsTemp.open "EXEC FEE_GetExamFeeTypeByClassId "&intClass_id,conn,3,3
    If rsTemp.recordcount > 0 Then
    If strExamFeeDescription <> "" and rform("floatExamFeePayingAmount") <> "" then
    intExamFeeDiscount = 0
    If Trim(rform("floatExamFeeDiscount")) <> "" then
    intExamFeeDiscount = Trim(rform("floatExamFeeDiscount"))
    End if
    End if

    While not rsTemp.EOF
    If Trim(rform("floatExamDBAmount"&rsTemp("ExamFeeId"))) <> Trim(rform("floatExamAmount"&rsTemp("ExamFeeId"))) Then
    intExamFeeAmount = Trim(rform("floatExamAmount"&rsTemp("ExamFeeId"))) - Trim(rform("floatDBAmount"&rsTemp("ExamFeeId")))
    strSQL = strSQL & "INSERT INTO tblExamfee (Student_Id, Class_Id, Section_id, FY_Id, Feetype_Id,Description,Amount, Receipt_id,date) VALUES ("&intStudnetId&","&intClass_id&","&intSectionid&","&intFYId&","&rsTemp("ExamFeeId")&",'"&strExamFee Description&"',"&intExamFeeAmount&","& intExamFeeReceiptId &",'"& getLocalDateTime() &"');"
    response.write("ExamFEE Inserted Successfully")
    'print sql
    'response.end
    End if
    rsTemp.movenext
    Wend
    End if

    'Next
    If Len(strSQL) > 0 Then

    conn.execute (strSQL)
    Call checkDBError(strSQL)
    If Trim(rForm("floatDiscount")) <> "" then
    intTotalPaidAmount = cint(Trim(rform("floatPayingAmount"))) + cint(Trim(rForm("floatDiscount")))
    Else
    intTotalPaidAmount = cint(Trim(rform("floatPayingAmount")))
    End If
    If Trim(rForm("floatExamFeeDiscount")) <> "" then
    intTotalExamFeePaidAmount = cint(Trim(rform("floatExamFeePayingAmount"))) + cint(Trim(rForm("floatExamFeeDiscount")))
    Else
    intTotalExamFeePaidAmount = cint(Trim(rform("floatExamFeePayingAmount")))
    End if

    sql = "EXEC ALLFEE_ADDTRANSACTIONS '"&rForm("strDescription")&"',0,"&intTotalPaidAmount&",'"&rForm("strBusDescription")&"',0,"&intTotal BusAmount&",'"&rForm("strExamFeeDescription")&"',0,"&intTotalExamFeePaidAmount&","&cint(session("DID "))&",'"&getLocalDateTime()&"',"&intReceiptId&",6"
    conn.execute sql

    If rForm("floatDiscount") <> "" Or rForm("floatBusDiscount") <> "" Or Trim(rForm("floatExamFeeDiscount")) <> "" then
    sql = ""
    sql = "EXEC AllMAINTAINANCE_ADDEXPENSES 1,'"&getLocalDateTime()&"',"&rForm("floatDiscount")&",'"&strStudnetCode&" - Term Fee Discount',"&rForm("floatBusDiscount")&",'"&strStudnetCode&" - Bus Fee Discount',"&rForm("floatExamFeeDiscount")&",'"&strStudnetCode&" - Exam Fee Discount',"&cint(session("DID"))&",7"
    conn.execute sql
    End if

    Call checkDBError(sql)
    Conn.commitTrans

    If rform("strChkSMS") = "on" then
    ''Sending SMS to parent
    If len(strMobileNO) = 10 then
    strMessage = "D/P, Thank you for paying Term Fee amount Rs."&rform("floatPayingAmount")&" aginst your kid "&strStudentName &". \nwww.montessori-jngroups.com"
    SendSMS "91"&strMobileNO, strMessage
    End if
    End If

    move page&"?NAVID="&rstr("NAVID")&"&intStudentId="&intStudnetId&"&action=paid&intReceiptId="&intReceiptId &"&strStudentCode="&rstr("strStudentCode")

    End If
    End If

    'Getting Fee detials
    rs.open "EXEC FEE_GetDueAmountByStudentid "& intStudnetId,conn,3,3
    If rs.recordcount > 0 Then
    intTotalClassFee = rs("TotalClassFee")
    intPaidAmount = rs("Paid")
    intDueAmount = rs("Due")
    End If
    rs.close

    rs.open "EXEC FEE_GetExamFeeDueAmountByStudentid "& intStudnetId,conn,3,3
    If rs.recordcount > 0 Then
    intTotalClassExamFee = rs("TotalClassFee")
    intPaidExamAmount = rs("Paid")
    intExamFeeDueAmount = rs("Due")
    End If
    rs.close



    print ("<table cellpadding=0 cellspacing=0 align=center width='100%' height='100%' border=0 bordercolor='green' >")
    print ("<form name='f_feedetails' method='post' action='AllRegularFee_Entry.asp?NAVID="&rstr("NAVID")&"&intStudentId="&intStudnetId&"&action=save&st rStudentCode="&rstr("strStudentCode")&"' onSubmit='return f_feedetails_save_validate();'>")

    '1st Row Title And Name
    print("<tr height='10'><td valign='top'>")
    GetHeaderStructure_Back "strStudentCode="&rstr("strStudentCode")
    print("</td></tr>")


    '2nd Row to search Student
    If rstr("action") = "paid" Then
    %>
    <script language='javascript'>
    <!--
    document.open('Feepaid_print.asp?strFeeType=ALLFEE&intStudentId=<%=intStudnetId%>&IntClass_id=<%=int Class_id%>&IntSection_id=<%=intSectionid%>&intReceiptId=<%=Trim(rstr("intReceiptId"))%>','cardview<% =j%>','status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=350,top=0,left=0')
    -->
    </script>
    <%
    print("<tr height='10'><td class='greennormal' align='center'>Amount paid successfully.</td></tr>")
    End if

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,574
    Thanks
    80
    Thanked 4,620 Times in 4,583 Posts
    Visual Studio can be used to debug ASP code. But you have to also change the settings in IIS to allow this.

    Not to ask a dumb question, but since when is print( ) a valid ASP command???
    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.

  • #3
    New Coder
    Join Date
    Dec 2011
    Posts
    29
    Thanks
    6
    Thanked 0 Times in 0 Posts
    how to use visual sstudio for debugging the asp file.And tell me the changes of iis settings

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,574
    Thanks
    80
    Thanked 4,620 Times in 4,583 Posts
    To tell the truth, it's been so long since I did this that I would just have to GOOGLE the answer. So... Try googling and see if you can find 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.


  •  

    Posting Permissions

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