![]() |
||||||||
| |
||||||||
DB_ExecuteSQL function returns incorrect numeric values for select statementsThis problem has been observed with QA Partner 4.0.1 on UNIX and on Windows QA Partner versions at least through 4.6.2. There appears to be some loss of resolution for large numbers. This can be observed by storing 16777217.0 in a REAL or NUMBER column of a database row. When this row is selected, the value seen is 16777216.0. For Oracle databases this behavior is observed with columns of NUMBER(8) or larger. This behavior has also been seen with REAL columns on both MS Access and Oracle.4Test Solution - Convert numeric columns of your database to strings as part of each SQL select statement that gets numeric values. For Oracle there is a TO_CHAR function that will do this from your SQL statements.
select TO_CHAR(column,"FM9999999990.") from tablename
After retrieving the values as strings you will probably need to convert them back to real values. Be sure to include a decimal point in the string so that it will not be seen as an INTEGER.
if StrPos(".",sValue) == 0
TestMap
Solution -
The same 4Test solution can be implemented within the TM_DATA_MAP definition
for the numeric columns in question. Then normal TestMap Extensions processing
will properly convert the data to REAL, INTEGER or STRING as required for
the x.member variable.
{"x.member",0,"column",NULL,"TO_CHAR(x1.column,'9999999990')"}
|
||||||||
|
Send
questions or comments about this web site to: webmaster@TestMap.com |
||||||||