472,325 Members | 1,020 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,325 software developers and data experts.

Urgent...Having problem debugging...Need help ASAP!

7
Hello,
To start with here is the code:

Expand|Select|Wrap|Line Numbers
  1. Public Function Paymentget (s12MoRate)
  2. strCompanyCode = objXML.selectSingleNode("policy/companyCode").text
  3. strState = objXML.selectSingleNode("policy/insured/state").text
  4.  
  5. set rsDownPayment = getCache("down_payment")
  6.  
  7. dim tempPremium, totalTaxes
  8.  
  9. totalTaxes = 0
  10. tempPremium = s12MoRate
  11.  
  12. ' calculate the taxes so they can be front loaded in the payment schedule
  13. dim TaxCov
  14. for each TaxCov in objXml.selectNodes("//coverage[manOptSwitch='T']")
  15. taxRate = cdbl(TaxCov.selectSingleNode("../rate/coverage[@covCode = '" & TaxCov.selectSingleNode("coverageCode").text & "']/twelveMonth").text)
  16. tempPremium = tempPremium - taxRate
  17. totalTaxes = totalTaxes + taxRate
  18. next
  19.  
  20. ' CLR - new filter as of 12/25/02 for new payplan table structure
  21. set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "a01_company = '" & objLogic.Company & "' or a01_company = '99'")
  22. set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "a02_state = '" & objLogic.BikeState & "' or a02_state = 'ZZ'")
  23. set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "min_premium <= " & tempPremium & " and b80_userline = '" & objLogic.userline & "' and profile = '" & objLogic.profile & "'")
  24.  
  25. dim minimumPct
  26. dim payment
  27. dim installmentfee
  28.  
  29. ' initialize payment percentage, amount, and fee to be full pay parameters as default
  30. minimumPct = 1
  31. payment = tempPremium
  32. installmentfee = 0
  33. ' now loop through available plans, and get the minimum that they can get in the policy
  34. while not rsDownPayment.eof
  35.  
  36. if cdbl(rsDownPayment("m84_instpct")) < cdbl(minimumPct) then
  37.  
  38. minimumPct = cdbl(rsDownPayment("m84_instpct"))
  39. payment = cdbl(rsDownPayment("m84_instpct")) * tempPremium
  40. installmentfee = rsDownPayment("first_installment_fee")
  41.  
  42. end if
  43. rsDownPayment.MoveNext
  44. wend
  45.  
  46. Paymentget = cdbl(payment) + cdbl(installmentFee) + cdbl(totalTaxes)
  47.  
  48. End Function
  49.  
  50.  
  51. I have a few questions for the asp guru’s out there:
  52. Just a brief summary…this function works fine until the value of s12MoRate is less than 999. If it is more than 999 than the value for the Payment (s12MoRate) is 0, which is not right. 
  53. I am not good at asp & was wondering on how to debug the application starting from checking what value does s12MoRate has?? 
  54. Than how do I check the value for the following?
  55. set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "a01_company = '" & objLogic.Company & "' or a01_company = '99'")
  56. set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "a02_state = '" & objLogic.BikeState & "' or a02_state = 'ZZ'")
  57. set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "min_premium <= " & tempPremium & " and b80_userline = '" & objLogic.userline & "' and profile = '" & objLogic.profile & "'")
  58. Than check does the while loop execute and what value does payment gets (payment = cdbl(rsDownPayment("m84_instpct")) * tempPremium)??
  59.  
Please wrap your code in CODE tags theres a sticky on how todo it

Mod iam_clint

Any help is appreciated ASAP…thanks a lot for yr time…bye
Jan 9 '07 #1
0 1086

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Rahul S. | last post by:
Hey all: I need urgent information how to set the environment in Visual.NET wiritng in C. I am working with a licensed version of the Analyze...
3
by: Rahul S. | last post by:
Hey all: I need urgent information how to set the environment in Visual.NET wiritng in C. I am working with a licensed version of the Analyze...
7
by: Gordon Smith | last post by:
I have four (4) ASP.NET Web applications/Web sites on a IIS/6 - Windows Server 2003 production server. 3 of them work fine. I just installed the 4th...
8
by: Chris | last post by:
Hi, All my websites and webservices are down. I get the following message Server Error in '/mywebservices' Application....
0
by: Radhesh Reddy | last post by:
One of our clients is in need of following consultants Business analyst with I2 background Location: Overland park,KS Duration: 6 months+...
4
by: archana | last post by:
Hi all, I am having one confusion regarding invoking web method of web service asychronously through windows applicaiton. What i am doing is i...
0
by: IT Jobs | last post by:
Hi We are from Ventures IT Solutions, A Young Organisation based in Delhi, and is started with a vision to provide, quality services to our...
2
by: feltra | last post by:
Hi, The following is from my friend, who has some technical problem at present in accessing the web... I am writing for him... Kindly request...
3
by: JMD | last post by:
A set of xsd files has been working fine for us at this site, but now it gives *intermittent* errors for someone at a different cite (who is...
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.