If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > How do I compare float values in ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-04, 02:56
Mini Nair Mini Nair is offline
Registered User
 
Join Date: Feb 2004
Posts: 12
Arrow How do I compare float values in ASP

I am carrying out a project in Oracle and ASP. Using ASP i need to compare two floating point values...but it gives me type mismatch error. Can anyone please help me out ?????
Reply With Quote
  #2 (permalink)  
Old 03-06-04, 18:15
Cinil Cinil is offline
Registered User
 
Join Date: Feb 2004
Location: New Jersey
Posts: 17
Does the normal comparison a=b doesnt work?
entha mini chechi oru preshnam...
Reply With Quote
  #3 (permalink)  
Old 03-08-04, 01:38
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
If CDbl(Var1) = CDbl(Var2) Then

Or to compare up to the first 4 decimal places:
If Round(CDbl(Var1), 4) = Round(CDbl(Var2), 4) Then
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On