gid_216
13 years agoFrequent Contributor
Data Comparision Error
Hi,
In an aplication, while validating the total from a Microsoft DataGridView, at the end when I am trying to campare using
"If CDbl(XXXXX)=CDbl(YYYYY) Then"
It fails even if the data are same. but If I follow
"If CStr(CDbl(XXXXX))=CStr(CDbl(YYYYY) )Then"
then it pass. This scenario is tested for the decimal values. please tell me waht to do to validate them without converting to String. Here the values are updating when CDbl is used like changing from 8542.30 to 8542.3 etc.
Thanks,
Deepak
In an aplication, while validating the total from a Microsoft DataGridView, at the end when I am trying to campare using
"If CDbl(XXXXX)=CDbl(YYYYY) Then"
It fails even if the data are same. but If I follow
"If CStr(CDbl(XXXXX))=CStr(CDbl(YYYYY) )Then"
then it pass. This scenario is tested for the decimal values. please tell me waht to do to validate them without converting to String. Here the values are updating when CDbl is used like changing from 8542.30 to 8542.3 etc.
Thanks,
Deepak