Hi Weeepie,
If you want to completly disconnect your datagrid from the dataset and run different table with datagrid then,
you will have to do the following
Datagrid.DataSource = Nothing
However, you are just changing the parameter, so I presume you are using the same table.
Assuming that your query results were filled to dataset "objdsTest" and the datagrid was mapped to table name "Tempy", then..
Me.objdsTest.Tempy.Clear()
The line above will clear the data in dataset and so for the next query all you have to do is fill it in again.
' need your SQL command with different parameters first.
Me.daTempy.Fill(objdsTest)
I hope this was the solution for your problem.
************************************************** ********************
Sent via Fuzzy Software @
http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...