problem to write data to the database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • qfchen
    New Member
    • Oct 2006
    • 91

    problem to write data to the database

    I have a data table in the database, initially it's only one parameter, called "department ", later I'd like add another parameter, called "person". I was able to read both "department " and "person", I can also modify "department ", but I can't wrist to "person", I had checked the dataSet, and its property, still can't figure out this problem.Here are the code to update the database.

    Code:
    Me.Employee_DataSet.Department.Rows(cboDepartment.SelectedIndex).Item(0) = txtDepartment.Text
    Me.Employee_DataSet.Department.Rows(cboDepartment.SelectedIndex).Item(1) = txtPerson.Text
    Me.DepartmentTableAdapter.Update(Me.Employee_DataSet.Department)
    Me.DepartmentTableAdapter.Update(Me.Employee_DataSet)
    Last edited by Frinavale; Jan 4 '10, 07:58 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.
Working...