Hi,
I'm trying to find the largest number in a table with:
TblInventoryTableAdapter.GetData.Compute("Max(InvID)", Nothing)
The code works just dandy. However for reasons unknown, it does not update while my program is already running. When I enter a larger value, it I have to close my app and open it again before it returns my newly entered larger number. Just closing and reopening the form does not work, the entire application needs to be closed and reopened.
I'm also reading the row count with: TblInventoryTableAdapter.GetData.Rows.Count
, at the same time as finding the largest number. The row count updates, which means the TableAdaptor is updating. So for reasons unknown Compute does not include new records.:confused:
Do I have to somehow release the compute function from the table adaptor, similarly to how you remove a filter when you are done filtering data?
I have tried TblInventoryTableAdapter.Update(Me.AccommodationDataSet.tblInventory)
but no difference.
Any help would be greatly appreciated
Marco