Hello, i want to ask is it possible to compare a db table store with a table store??
- 8 years ago
Correct, there is no way of creating a table in the stores via script... that's kinda what I was implying that, to do what you want to do, you'll need to use a different methodology than the Tables checkpoints. Roughly pseudo-code (not tested, not runnable):
SQLDataSet = SQLQuery.Open(sqlQueryString); OnScreenTableObject = Aliases.myApp.myTable; for (var i = 0; i < OnScreenTableObject.RowCount; i++){ if (SQLDataSet.EOF) break; for (var j = 0; j < OnScreenTableObject.ColumnCount; j++){ Compare(SqlDataSet.Field(j), OnScreenTableObject.Cell(i, j)); } SQLDataSet.NextRow(); }
So, you loop through you're onscreen table and compare, cell by cell, row by row, and compare the contents. I kinda shortcutted in the pseudo code to imply that there's a "compare" routine that compares the two. This is the best way I know of to do the kind of comparison you need to do where the data being compared between SQL and the onscreen data changes from run to run. There are probably some other minor techniques that can be applied (using DDT driver, storing the SQL data into a table variable and then doing the comparison, etc) but, for what you want to do, a table checkpoint is not going to work for you.