Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Database from DataGridView

Status
Not open for further replies.

Tim8w

Programmer
Apr 8, 2003
44
US
I have a DataGridView that was created using the wizard. I made a change to one of the column's data and I want to save the changes back to the database. Here's the simple code:

Code:
Me.WHVMastersUniverseTableAdapter.MastersOnHold(Me.PreManfDataSet.WHVMastersUniverse)
dgvMasters.AutoResizeColumns()
For iIndex = 0 To dgvMasters.RowCount - 2
    dgvMasters.Rows(iIndex).Cells("Status").Value = "On-Hold"
Next iIndex
Me.WHVMastersUniverseTableAdapter.Update(Me.PreManfDataSet.WHVMastersUniverse)

I don't get any erros but the 'Status' is not saved in the database...

 
Are you sure that Status is included in the dataset that populates the grid?

--------------------------------------------------
Stubbornness is a virtue -- if you are right. --Chuck Noll
--------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top