•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 456,581 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,653 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 1122 | Replies: 2 | Solved
![]() |
•
•
Join Date: Nov 2006
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
Hello,
To start with here is the code:
Public Function Paymentget (s12MoRate)
strCompanyCode = objXML.selectSingleNode("policy/companyCode").text
strState = objXML.selectSingleNode("policy/insured/state").text
set rsDownPayment = getCache("down_payment")
dim tempPremium, totalTaxes
totalTaxes = 0
tempPremium = s12MoRate
' calculate the taxes so they can be front loaded in the payment schedule
dim TaxCov
for each TaxCov in objXml.selectNodes("//coverage[manOptSwitch='T']")
taxRate = cdbl(TaxCov.selectSingleNode("../rate/coverage[@covCode = '" & TaxCov.selectSingleNode("coverageCode").text & "']/twelveMonth").text)
tempPremium = tempPremium - taxRate
totalTaxes = totalTaxes + taxRate
next
' CLR - new filter as of 12/25/02 for new payplan table structure
set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "a01_company = '" & objLogic.Company & "' or a01_company = '99'")
set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "a02_state = '" & objLogic.BikeState & "' or a02_state = 'ZZ'")
set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "min_premium <= " & tempPremium & " and b80_userline = '" & objLogic.userline & "' and profile = '" & objLogic.profile & "'")
dim minimumPct
dim payment
dim installmentfee
' initialize payment percentage, amount, and fee to be full pay parameters as default
minimumPct = 1
payment = tempPremium
installmentfee = 0
' now loop through available plans, and get the minimum that they can get in the policy
while not rsDownPayment.eof
if cdbl(rsDownPayment("m84_instpct")) < cdbl(minimumPct) then
minimumPct = cdbl(rsDownPayment("m84_instpct"))
payment = cdbl(rsDownPayment("m84_instpct")) * tempPremium
installmentfee = rsDownPayment("first_installment_fee")
end if
rsDownPayment.MoveNext
wend
Paymentget = cdbl(payment) + cdbl(installmentFee) + cdbl(totalTaxes)
End Function
I have a few questions for the asp guru’s out there:
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.
I am not good at asp & was wondering on how to debug the application starting from checking what value does s12MoRate has??
Than how do I check the value for the following?
set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "a01_company = '" & objLogic.Company & "' or a01_company = '99'")
set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "a02_state = '" & objLogic.BikeState & "' or a02_state = 'ZZ'")
set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "min_premium <= " & tempPremium & " and b80_userline = '" & objLogic.userline & "' and profile = '" & objLogic.profile & "'")
Than check does the while loop execute and what value does payment gets (payment = cdbl(rsDownPayment("m84_instpct")) * tempPremium)??
Any help is appreciated ASAP…thanks a lot for yr time…bye
To start with here is the code:
Public Function Paymentget (s12MoRate)
strCompanyCode = objXML.selectSingleNode("policy/companyCode").text
strState = objXML.selectSingleNode("policy/insured/state").text
set rsDownPayment = getCache("down_payment")
dim tempPremium, totalTaxes
totalTaxes = 0
tempPremium = s12MoRate
' calculate the taxes so they can be front loaded in the payment schedule
dim TaxCov
for each TaxCov in objXml.selectNodes("//coverage[manOptSwitch='T']")
taxRate = cdbl(TaxCov.selectSingleNode("../rate/coverage[@covCode = '" & TaxCov.selectSingleNode("coverageCode").text & "']/twelveMonth").text)
tempPremium = tempPremium - taxRate
totalTaxes = totalTaxes + taxRate
next
' CLR - new filter as of 12/25/02 for new payplan table structure
set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "a01_company = '" & objLogic.Company & "' or a01_company = '99'")
set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "a02_state = '" & objLogic.BikeState & "' or a02_state = 'ZZ'")
set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "min_premium <= " & tempPremium & " and b80_userline = '" & objLogic.userline & "' and profile = '" & objLogic.profile & "'")
dim minimumPct
dim payment
dim installmentfee
' initialize payment percentage, amount, and fee to be full pay parameters as default
minimumPct = 1
payment = tempPremium
installmentfee = 0
' now loop through available plans, and get the minimum that they can get in the policy
while not rsDownPayment.eof
if cdbl(rsDownPayment("m84_instpct")) < cdbl(minimumPct) then
minimumPct = cdbl(rsDownPayment("m84_instpct"))
payment = cdbl(rsDownPayment("m84_instpct")) * tempPremium
installmentfee = rsDownPayment("first_installment_fee")
end if
rsDownPayment.MoveNext
wend
Paymentget = cdbl(payment) + cdbl(installmentFee) + cdbl(totalTaxes)
End Function
I have a few questions for the asp guru’s out there:
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.
I am not good at asp & was wondering on how to debug the application starting from checking what value does s12MoRate has??
Than how do I check the value for the following?
set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "a01_company = '" & objLogic.Company & "' or a01_company = '99'")
set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "a02_state = '" & objLogic.BikeState & "' or a02_state = 'ZZ'")
set rsDownPayment = applyFilterAndReloadRecordset(rsDownPayment, "min_premium <= " & tempPremium & " and b80_userline = '" & objLogic.userline & "' and profile = '" & objLogic.profile & "'")
Than check does the while loop execute and what value does payment gets (payment = cdbl(rsDownPayment("m84_instpct")) * tempPremium)??
Any help is appreciated ASAP…thanks a lot for yr time…bye
I have never managed to find a good way to debug classic ASP, and always end up with either text to a log file, or response.write all over the place for tracing.
Last edited by nikkiH : Jan 11th, 2007 at 10:39 am.
Google is your friend. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/
Bored? Visit http://www.kaelisspace.com/
•
•
Join Date: Jan 2007
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 1
Just a quick question:
What software are you using to write the ASP code in?
Edit:
If you are using MicroSoft Visual studio 6 - Visual Interdev
But there are a few settings that you need to do first.
1. In your IIS right click on the Virtual Directory of your site and click properties.
2. Then change the application protection from Medium(Pooled) --> Low(IIS Process)
3. Click the "Configuration" button next to the drop down.
4. Click on the "debugging" tab and tick "Enable ASP Server-Side scripting debugging" and "Enable ASP Client-Side scripting debugging" and click apply.
5. in your browser go to Tools --> Internet Options --> Adavanced --> and make sure that the following are NOT! ticked Disable Script Debugging.
Close down any browsers and reopen if an error occurs a message will appear asking what of the 3 above debuggers to use (if installed) choose one and click yes.
This will then show you the problem/error within in your code by highlighting and show a message of the error. It will also allow to see what value your varaibles have.
What software are you using to write the ASP code in?
Edit:
If you are using MicroSoft Visual studio 6 - Visual Interdev
But there are a few settings that you need to do first.
1. In your IIS right click on the Virtual Directory of your site and click properties.
2. Then change the application protection from Medium(Pooled) --> Low(IIS Process)
3. Click the "Configuration" button next to the drop down.
4. Click on the "debugging" tab and tick "Enable ASP Server-Side scripting debugging" and "Enable ASP Client-Side scripting debugging" and click apply.
5. in your browser go to Tools --> Internet Options --> Adavanced --> and make sure that the following are NOT! ticked Disable Script Debugging.
Close down any browsers and reopen if an error occurs a message will appear asking what of the 3 above debuggers to use (if installed) choose one and click yes.
This will then show you the problem/error within in your code by highlighting and show a message of the error. It will also allow to see what value your varaibles have.
Last edited by gintom : Jan 13th, 2007 at 9:33 pm.
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Recursion Search Help (URGENT!) (C)
- Problem in resizing of resolution of windows for a web page (HTML and CSS)
- Urgent Pls Help: My codes are in errors! (C++)
- Urgent: I need Help in c++.net! (ASP.NET)
- urgent..i need help.. (C++)
- Urgent Hardware Problem Help!!!! (Troubleshooting Dead Machines)
Other Threads in the ASP Forum
- Previous Thread: Any suggestions or help will be appreciated…ASAP!
- Next Thread: File Download Dialog Box(ASP)


Linear Mode