Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    12

    Arrow Unanswered: 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 ?????

  2. #2
    Join Date
    Feb 2004
    Location
    New Jersey
    Posts
    17
    Does the normal comparison a=b doesnt work?
    entha mini chechi oru preshnam...

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •