OleDbDataAdapter Problem
I have an Select OleDbDataAdapter that I am using to return fields from an Access Database. It is inside of another DataAdapter. The first time it executes it works perfectly but if I try to execute it again with another key it returns the same value
Here is the code:
txtItemNum(z) = ds.Tables("PODetail").Rows(z).Item(i)
itemSelect = txtItemNum(z)
Dim sqlstring As String = _
String.Format("SELECT * from [Raw Materials] Where [ProductID#New] = '{0}'", _
itemSelect)
Dim filler As Integer
dc = New OleDb.OleDbDataAdapter(sqlstring, con)
Try
filler = dc.Fill(ds, "ItemDesc")
Catch ex As Exception
MsgBox(" Item Description Exception" + filler)
End Try
txtDescriptionIn = ds.Tables("ItemDesc").Rows(0).Item(2)
'txtItemDesc(z) = ds.Tables("ItemDesc").Rows(0).Item(2)
txtItemDesc(z) = txtDescriptionIn
dc = Nothing
Debug shows the select where having the new values but the item Description is always the same
Thanks in advance for the help
I am at a loss to figure out why
Bob Anderson
IT Guy
New London OHio
|