I used the following code to add data into DataGridView control
query = "SELECT * FROM primary_student_table WHERE admityear=" & admityear & " AND batch= " & batch & ""
da = New SqlDataAdapter(query, con)
da.Fill(ds, "primary_student_table")
DataGridView1.DataSource = ds.Tables("primary_student_table")
I need to display records from another table later in the same control so I need to clear the table. How can I do this in VB.NET?
I am using SQL Server