Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 3rd, 2006, 06:17 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default Rounding problem

Hello

I am doing accounting program. Its double entry accounting system. Example

1-Aug-2006 20000 ACCOUNT PAYABLES DB: 2000.00
1-Aug-2006 60200 EXPENSES CR: 2000.00

I am generating a report to show monthly journal.

I am calculating totDBAmt and totCRAmt. Based on above, it should show same value(debit and credit). But I am getting some cents difference.

totDBAmt : 757892.74
totCRAmt : 757592.79

in the loop, i am calculating these values. I am using cdbl(rs("dbAmt")) and cdbl(rs("cramt"))

Why is it showing difference?

If I see each entry, its showing correct values(dbamt and corresponding cramt).

where was I wrong?



 
Old August 17th, 2006, 12:14 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Hi,
can you paste the code

Om Prakash





Similar Threads
Thread Thread Starter Forum Replies Last Post
Rounding JasperGIS Beginning VB 6 1 December 14th, 2005 03:09 PM
Number(20,2) Rounding off Problem saravananedu Oracle 1 October 8th, 2005 11:10 PM
Rounding kilika SQL Server 2000 4 June 1st, 2005 03:36 PM
What's with the rounding?? kaizer BOOK: Beginning Java 2 2 December 22nd, 2003 11:36 PM
Rounding in C# cjo ASP.NET 1.0 and 1.1 Basics 3 November 3rd, 2003 04:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.