G
Guest
I have a vb .net program which fills a data grid upon form load from an
acccess database. This works great. Now, I have to add a combo box and use
it to alter the underlying sql statement and re-fill the data grid. I have
never done this before, but I created a new sql statement in strSql from the
combobox, update the data adapter, and try to fill the data grid. The
program halts on the Fill with no particular explanation or complaint that I
can determine. Something tells me that I have to do something else before
the Fill from the dataset. Any suggestions?
Thanks,
Michael
Private Sub cboContactPosition_SelectedIndexChanged _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles cboContactPosition.SelectedIndexChanged
' Define and build the SQL statement for the data grid . . .
..
..
..
daXtreme.SelectCommand.CommandText = strSql.ToString
' Fill the data grid using the new Sql command. . .
Me.daXtreme.Fill(dsXtreme) ' Debug hangs here for some
reason.
End Sub
acccess database. This works great. Now, I have to add a combo box and use
it to alter the underlying sql statement and re-fill the data grid. I have
never done this before, but I created a new sql statement in strSql from the
combobox, update the data adapter, and try to fill the data grid. The
program halts on the Fill with no particular explanation or complaint that I
can determine. Something tells me that I have to do something else before
the Fill from the dataset. Any suggestions?
Thanks,
Michael
Private Sub cboContactPosition_SelectedIndexChanged _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles cboContactPosition.SelectedIndexChanged
' Define and build the SQL statement for the data grid . . .
..
..
..
daXtreme.SelectCommand.CommandText = strSql.ToString
' Fill the data grid using the new Sql command. . .
Me.daXtreme.Fill(dsXtreme) ' Debug hangs here for some
reason.
End Sub