Proper Way to Test DataTable for Rows

Looking for some expert help here.

I am using the DynamicQueryAdapter to run a BAQ. I want to know if the Results table has any rows and based on that, perform some other actions. While my code compiles fine, I keep getting the “There is no row at position 0.” error. I have tried the following.

if (dqa.QueryResults.Tables["Results"].Rows.Count > 0) {}

if (dqa.QueryResults != null) {}

if (dqa.QueryResults.Tables["Results"].Rows.Count == 0) {}

Never mind. The error was someplace else :man_facepalming: