Hi, Using Adapter V2, SQL 2K, VB2005, WinForm.
I've got a modified collection which does not save. Here's what I've done.
'aBudgetDivs' is an in-memory collection filtered as EntityView2(Of BudgetDivisionEntity). It has an Identity PK.
For each row of 'aBudgetDivs' I modify field 'AppAllocID' as per the code:
For Each item As EntityBase2 In aBudgetDivs
item.Fields("AppAllocID").CurrentValue = approvalPK
item.IsNew = True
Next
I now save the modified collection using:
approvals.SaveAllBudgetDivs(CType(aBudgetDiv, EntityCollection(Of EntityClasses.BudgetDivisionEntity)), False)
Here's the method.
Sub SaveAllBudgetDivs(ByVal allRows As EntityCollection(Of BudgetDivisionEntity), ByVal rFetch As Boolean)
Dim adapter As New DataAccessAdapter()
Try
adapter.SaveEntityCollection(allRows, rFetch, False)
Finally
adapter.Dispose()
End Try
End Sub
Nothing fancy, but nothing is saved and I can't see where I'm going wrong. Help?