I am certain this is a dumb problem, but I cannot find it.
I am trying to populate a datagridview (dgv) in WinForms.
I define my query sSQL = "select * from Table", I open my connection. Then I am running the following code:
sdaB = CurrentDB.ExecuteAdapter(sSQL); //Returns sqlDataAdapter --CurrentDB is a DataClass
DataTable dtB = new DataTable();
sdaB.Fill(dtB); //On this line, the code seems to stop (jumps to form view) no other lines are run.
dgvB.DataSource = dtB;As I mention above in the comments, the code runs to .Fill line and when I step that line of code, I jump to the Form view and the code stop. The dgv is not populated. I am stumped. I know this is supposed to be simple.
I have tested my sql statement, and my connection. Both seem to be valid (there is data there).
Any suggestions on why the code will not execute on the sdaB.Fill(dtB) line?