I am trying to capture information on an item from a different database table than the item. The code works but the m_daFRZadapter.Fill(m_dtFRZ) seems to be appending the new data to the dataset. After going through the first 3 parts, m_dtFRZ.Rows.Count = 3. Is there something I need to do to empty the data table before I rerun the query and reload the dataset?
CODE
Dim sString As String = RTrim(txtItemNo.Text)
m_cnFRZConn.ConnectionString = "Data Source=KEMI-FJ89SF1\RONSQL;Initial Catalog=Dump1;Integrated Security=True"
m_cnFRZConn.Open()
MyStr = "Select item, freeze_date, comp_matl From dump1.dbo.FrzCost072709 where item like '" & sString & "'"
m_daFRZadapter = New SqlDataAdapter(MyStr, m_cnFRZConn)
m_cbFRZCmdBldr = New SqlCommandBuilder(m_daFRZadapter)
m_daFRZadapter.Fill(m_dtFRZ)