Since the datatable gets the data from the SQL query, you can also use the SQL statement to count the number of rows in the query result.
For example, in datatable you do "select localtime, trace1 from intdata where xxx". You can get the count by "select count(trace1) from intdata where xxx". Use the same condition in order to get the same number of rows.
Maybe another SQLExec object is needed to do the count.
Whenever the datatable executes the SQL, the SQLExec executes and return the count.
Ryan Shi
National Instruments