Hello, i want to ask is it possible to compare a db table store with a table store??
i have a windows application, very complicated.
I want to start simply by comparing a list of data displayed in a tab with the real data in the database table.
I was thinking what is the best solution: table checkpoint or db table checkpoint?? i'm lost...
I want to compare this list to the real data in a sql table.
Can i create one table checkpoint with live data and another one a db table checkpoint with the content of the sql table and then compare them to each other??
Thanks for your help
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.