?Instantiate a command based on valid member ID.
 Dim cmd1 As SqlClient.SqlCommand = cnn1.CreateCommand
 str1 = «SELECT * FROM CurrentMembers»
 cmd1.CommandText = str1
 ?Use command to specify SelectCommand property
 ?for a data adapter.
 Dim dap1 As SqlClient.SqlDataAdapter = _
 New SqlClient.SqlDataAdapter
 dap1.SelectCommand = cmd1
 ?Fill the data adapter.
 Dim das1 = New DataSet
 dap1.Fill(das1, «CurrentMembers»)
 ?Assign the data adapter to the DataGrid control.
 Me.DataGrid1.DataSource = das1

Поделитесь материалом с коллегами и друзьями