Forum Discussion
I use the ADO objects in TestComplete to build my own SQL queries and return a record set. I then have a baseline of what I'm looking for stored in a CSV file. I loop through the record set and compare column values per record with column values per row in the CSV file. It allows me to be very specific in my queries, allows me to format and trim values, and all sorts of stuff like that.
Now, that said, I THINK Data Table comparisons like you're doing allow you to alter the SQL query used. You might want to consider writing a custom query instead of using the default to "cast" values or trim them or round them or whatever.... what you're experiencing, as mentioned, is that the data table stored values only store up to a certin number of digits...but the data in the SQL table itself is a float or something like that which may have additional significant digits that don't display. Doing a custom query allows you to do these kind of formatting to actually compare "apples to apples" rather than what's going on right now.
Thanks for quick reply and info shared.
I do use ADO objects, mainly to connect and and drop DBs after comaprison is done, I might consider using more of them.
Speaking about "built-in" feature for DB tables comparison, I always use SELECT * FROM table_name to avoid missing anything, and these tables are stored in TC project, so I know they are correct. Again, my goal is to verify let's call it an aggreagtion process with different versions of our software, and so nothing get's broken/missing and I suppose to get identical data all the time. If so, the whole process works like a charm, when tbl_abc = tbl_abc with a "clean" log after, when at least one cell is unequal, it inconsistently (sometimes that unmatched value only and sometimes more of those that are actually correct and equal) are populating the log. Well, at least it catches when I have at least one incorrect record, but with many other correct and incorrect ones! :)
Related Content
- 5 years agoLogiv
- 12 years agomaheshwari_a
- 2 years agodhundley
- 5 years agoGradyJr