I am working with a Replace command ( data object ).
Using MsgGet( ) I enter a number ( ie. 4051.25 ). Because it is a string in the GET field ( which must accomodate any type of data type ), I convert it to a Numeric using VAL( ). The problem is that it adds many zeros using VAL ( Harbour ). When I go to seek the value in the database ( 4051.21 ), it can't match because the two numbers are not the same.
I want to limit the number of decimals to 2 for the purpose of matching. I tried using SET DECIMAL TO 2 at the beginning of the function, and then resetting it back to no filter, but that doesn't work out. Also, sometimes the number could need 4 decimal places, or 6.
Any suggestions on how to get the input in the MsgGet( ) to match the contents of the database field for comparison ?