I'm trying to save my changes back to the database but apparently this update command doesn't work. I haven't done too much into programming with DB's but my teacher pretty much just threw the work at us and left. I was wondering what I'm doing wrong here. It won't let me update saying that I need a proper UpdateCommand or something like that. Anyone know what I gotta do? Thanks

Public Sub saveToDB()
Dim i As Integer
Dim f As fruitInfo

For i = 0 To (fruit.Count - 1)
f = fruit(i)
If (dt.Rows.Count - 1) < i Then
MsgBox("I got here dee dee dee")
dt.Rows(i)("sold in winter") = False
dt.Rows(i)("sold in spring") = False
dt.Rows(i)("sold in summer") = False
dt.Rows(i)("sold in autumn") = False
dt.Rows(i)("Stocked by vendor") = False
dt.Rows(i)("stocked by bibby") = False
dt.Rows(i)("forecasting") = False
dt.Rows(i)("sales ytd") = False
dt.Rows(i)("physical inventory") = False
dt.Rows(i)("sold in winter") = f.winter
dt.Rows(i)("sold in spring") = f.spring
dt.Rows(i)("sold in summer") = f.summer
dt.Rows(i)("sold in autumn") = f.autumn
dt.Rows(i)("Stocked by vendor") = f.vendorStock
dt.Rows(i)("stocked by bibby") = f.bibbyStock
dt.Rows(i)("forecasting") = f.forecasting
dt.Rows(i)("sales ytd") = f.salesYTD
dt.Rows(i)("physical inventory") = f.physInventory
End If
dt.Rows(i)("name") = f.name
dt.Rows(i)("keyword") = f.keyword
dt.Rows(i)("price") = f.price
dt.Rows(i)("Qty on hand") = f.onHandQty
dt.Rows(i)("qty on shelf") = f.onShelfQty
dt.Rows(i)("qty in back") = f.inBackQty
dt.Rows(i)("shelving qty") = f.shelvingQty
dt.Rows(i)("safety stock") = f.safetyQty
dt.Rows(i)("economic order qty") = f.economicOrder
dt.Rows(i)("minimum order qty") = f.minOrder
dt.Rows(i)("sales cur period") = f.salesCurP
dt.Rows(i)("sales last period") = f.salesLasP
dt.Rows(i)("sales prior period") = f.salesPriP
dt.Rows(i)("qty pilfered") = f.pilferedQty
dt.Rows(i)("qty wasted") = f.wastedQty
End Sub