Failed to update in msAccess but successfully in dgv C#

后端 未结 1 1553
野的像风
野的像风 2021-01-29 02:34

This is my code for btnUpdate so that msAccess will update.

  private void btnUpdate_Click(object sender, EventArgs e)
            {
                string CoStr         


        
相关标签:
1条回答
  • 2021-01-29 03:29

    It doesn't appear that you are retrieving any data from the datagridview at all. You are retrieving all the contents from the StudentDB table in the Access database into DataSet ds. You then call GetChanges() on ds and save it into another DataSet called changes. Since the contents of ds come straight from the Access database there will be no changes to save.

    0 讨论(0)
提交回复
热议问题