
I'm using the following code to crete a new dataset, which then repopulates a DataGridView, based on an 'Add Query' DataSet ( creted using the wizard ). I'd like to know the underlying code, so I can slightly adapt it in a sub-routine. For example
Private Sub btnWhatever_Click( ..................................... and so on )
create connection to DB
create an SQL command with (?) in appropriate WHERE clause.
pass the parameter(s) to the command.
execute the command.
fill the DataGridView with new DataSet
close connection
End Sub()
Code:
PrivateSub btnABig_Click(ByVal sender AsObject, ByVal e As System.EventArgs)_ & Handles btnABig.Click
Try
Me.CustomersTableAdapter.initA(Me.Bm2009Customers.Customers)
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
EndTry
EndSub
In Ch. 20 there's only examples for non-query routines. Any help much appreciated.