Floating-point Division

I have the following code in a script:

' Pecentage Interest on Loan
YearlyInterestPercent = 6.5

' Get Annual Interst Rate from Interest Percentage
YearlyInterestRate = YearlyInterestPercent / 100

' Divide Yearly Interest Rate by 12
' to Get Monthly Interst Rate
MonthlyInterestRate = YearlyInterestRate / 12

These values are supplied by the user using a form but I made them static for this example. For some reason, when dividing the Yearly Interst rate by twelve, MonthlyInterestRate equals 5.41666666666667E-03. The result should be 0.005416667. Does anyone know what I can do to correct this?

View Replies


ADVERTISEMENT

Division In ASP

When I do something like this:

AllRevenueAttnAnnual = Result1 % Result2

I get an error - Invalid character

I am trying to dive Result1 by result2.

View Replies View Related

Division

I'm trying to divide a filesize in bytes by 1024 so I'll get a filesize in Kb. I want a round number but instead i'm getting a result of ten decimals. Who knows how solve this?

View Replies View Related

Obscure Division

i know, this shouldnt be a conundrum right? one just shouldnt divide by zero. but this is suddenly happening *all over* my site. after chasing the error here and there, i simplified things down to:

response.write cstr(4/2)
response.end

and i STILL get the error:
Microsoft VBScript runtime error '800a000b'
Division by zero
[followed by the line on which the error occurs]

so i know it's not my code. how can you get a division by zero error when you'r dividing with CONSTANTS??? did i change some obscure setting or something?now mind you, i tried "response.write cstr(4+2)" and the system managed to output "6".

View Replies View Related

Formatting Percent And Dealing With Division By Zero Problems

I have some values that I want to display as percent, such as the
retail price/wholesale price. In some instances, the wholesale price
is zero, so I get a division by zero error.

What can I do to avoid this?

Also, how can I get this to only show two decimals, instead of it
going .##### the way it does. I want it to look like .45%

View Replies View Related

Point CDO Object To Box

trying to use CDO object not working, have tried to set up default mail account which works ok, but CDO not piping through it. any know of any way to point CDO to box's mail account or something like that?! annoying coz CDO works ok on myother box, box not working on running SBS 2003.

View Replies View Related

At What Point Is Global.asa Run?

I'm wondering something about global.asa. We have a stats package that has been written for us. It tracks sessions by tracking session IDs rather than IP addresses, because this is much more accurate (tracking by IP can only give you an average guess at numbers of sessions).

The problem we have is that static HTML pages do not create a session ID. It remains as "-" in the log. I'm wondering if we can use a global.asa file to force IIS to open a session? The thing is, this will still be useless if global.asa only runs when the ASP file is requested, rather than when the first site file is requested.

So, now you have the background, the question is quite simple:

Does global.asa run when you first hit a site (ie: when default.htm is called) or does it run when you first hit an ASP page (like search.asp)?

Obviously, in the latter case that can mean that it's perfectly feasible for someone to spend half an hour on a site and never actually fire the global.asa or trigger a session, which is a rather fundamental problem.

View Replies View Related

Database Starting Point

I am just starting to think about adding a db to my Webs. I want to use a db
to change pages within various Webs and subwebs by scheduling these pages
ahead of time so the pages will already be loaded (visible) when a visitor
arrives. Sometimes I will need to replace one exisitng page with one or more
pages for the scheduled time period.

After the time period has passed, I want the Web or subweb changed back to
what is was before the original change took place automatically. None of the
Webs or subwebs will require any ecommerce or tranactional capability.

View Replies View Related

Moving A Decimal Point

ok i have a number lets say its 36 and i want to divid it by 150.... 0.24 returns... i want to change 0.24 and make it a percent to it would be 24% how would i do that...

View Replies View Related

Update Column To Add Decimal Point

have a 'money' field in the SQL 2000 table that users enter 200 (for example
which represents �2.00) without the decimal point, what I need is to have a
command or something that adds the decimal point before the last 2 digits,
so user enters 200 and the value stored in the table is 2.00 bearing in mind
that this value could be anything from 1.00 to 50.00.

View Replies View Related

Example Code For Using Insertion Point Of Data

anyone have a quick example of using insertion point of data with MSWC.Tools ?

e.g. how can I send data to "div" tag ?

Set oTools = Server.CreateObject("MSWC.Tools" )
oTools.processForm "output.asp", "template.asp", "<div>"

View Replies View Related

Main Point Of Loading Speed

if a page always have some picture that totally have near 250k does this a main point of affect the loading speed?

View Replies View Related

Change The Mouse Point To Sandglass

How can change the mouse point to Sandglass?

View Replies View Related

Stopping Running Code At A Certain Point

I have a asp page which is pretty long. This consitst of various recordsets. My intention is to stop execution of a code at a cetain point and test one value prior to this point. Is there any way to do this?

View Replies View Related

How To Export .asp Page To Power Point Slide

I have created a web application using ASP with VB.I would like to export some of my web pages (.asp page) to Power Point slides and view it as power point presentation.
will it be possible ?

View Replies View Related

Using Insertion Point Of Data With MSWC.Tools

anyone have an example of using insertion point of data with MSWC.Tools ?

e.g. how can I send data to a "div" tag ?

Set oTools = Server.CreateObject("MSWC.Tools" )
oTools.processForm "output.asp", "template.asp", "<div>"

View Replies View Related

Unable To Find An Entry Point Named EnumerateSecurityPackagesW In

I am trying to solve the following exception. The exception occurs when my
ASP.NET code behind code attemtps to access a remore site using SSL. Please
note that all certificates are valid and the remote site is trusted. Also, my
web site uses a custom HTTPModule implemented in a DLL named Security.dll.

Unable to find an entry point named EnumerateSecurityPackagesW in DLL
security.dll.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.EntryPointNotFoundException: Unable to find an
entry point named EnumerateSecurityPackagesW in DLL security.dll.

View Replies View Related

Error :: Microsoft VBScript Runtime Error '800a000b' Division By Zero

I am accessing the same error-containing ASP page on an ISP server using w2k IE6 but with different effect. On the first computer I get several line of HTML outputed by ASP, shown correctly by the browser, followed by a descriptive error message:

Microsoft VBScript runtime error '800a000b'
Division by zero

followed by the number of the error-making line. On the second machine my HTML is not displayed at all. Instead I am getting that meaningless error page sayng that The page cannot be displayed, HTTP 500 - Internal server error. How can I get the second computer be more informative about the errors?

View Replies View Related

Client Side Script - Form Fields -Point To Same Domain?

I am curious to know that if given two strings such as
http://www.domain.com & http://www.domain.com/somepage.asp how could I compare those strings to see if they are from the same domain? I am setting up a link exchange that requires a person provide their url and a verification url where my link is located. What I am trying to avoid is having someone do this:

www.theirdomain.com & www.someotherdomain.com/links.html whereas the second domain may have a link to my site but it is not related to the entrants domain.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved