Fellas, at runtime, I populate a TreeView using a SQL query that populates a dataset.

vb.net Code:
  1. Public Function GetRecorders(ByVal sqlString As String)
  2.         Dim result As Integer
  3.         ' -1 result means connection was not successful
  4.         Try
  5.             Dim _sql As String
  6.             _sql = sqlString
  7.             Dim connectionstring As String
  8.             connectionstring = "***PRIVATE***"
  9.             Dim cn As New SqlConnection(connectionstring)
  10.             da = New SqlDataAdapter(_sql, cn)
  11.             cn.Open()
  12.             Dim commandBuilder As SqlCommandBuilder = New SqlCommandBuilder(da)
  13.             da.Fill(ds, "MyRecorders")
  14.             result = 0
  15.         Catch ex As Exception
  16.             result = -1
  17.         End Try
  18.         Return result
  19.     End Function

I have a "Refresh" Button on my form that I want to clear all nodes in my TreeView and then re-populate it just like I do at Form Load. I have tried clearing my TreeView, clearing the dataset, clearing the dataset's Tables.. and nothing seems to work.. it keeps add appending the new list to the TreeView instead of clearing it.

Can you help me figure out the correct way to fill a dataset at Load time and be able to re-use that one dataset throughout the life of the program and be able to clera it, refill it, etc.?

Thanks!