Update database from DataGridView?
-
Hi I am using C# and Visual Studio 2005 to develop a Windows Application. I use the designer to bind a DataGridView to a table in a MS Access database. When I use the designer the following code is automatically generated in the Form_Load method:
// TODO: This line of code loads data into the 'patientStatusDataSet2.bv_Patients' table. You can move, or remove it, as needed.
this.procPatientList_AllInfoTableAdapter.Fill(this.patientStatusDataSet.procPatientList_AllInfo);I try to update the database when changes have been made to the data in the DataGridView, but cannot find what to use or how to do it. In the past I used to write my own code and could do updates. I am trying now to learn about the built-in functionality, but I am struggling. Neither
procPatientList_AllInfoTableAdapter
norpatientStatusDataSet
has any Update methods. Any assistance will be appreciated. Thanks. Kobus -
Hi I am using C# and Visual Studio 2005 to develop a Windows Application. I use the designer to bind a DataGridView to a table in a MS Access database. When I use the designer the following code is automatically generated in the Form_Load method:
// TODO: This line of code loads data into the 'patientStatusDataSet2.bv_Patients' table. You can move, or remove it, as needed.
this.procPatientList_AllInfoTableAdapter.Fill(this.patientStatusDataSet.procPatientList_AllInfo);I try to update the database when changes have been made to the data in the DataGridView, but cannot find what to use or how to do it. In the past I used to write my own code and could do updates. I am trying now to learn about the built-in functionality, but I am struggling. Neither
procPatientList_AllInfoTableAdapter
norpatientStatusDataSet
has any Update methods. Any assistance will be appreciated. Thanks. Kobus -
Hi I am using C# and Visual Studio 2005 to develop a Windows Application. I use the designer to bind a DataGridView to a table in a MS Access database. When I use the designer the following code is automatically generated in the Form_Load method:
// TODO: This line of code loads data into the 'patientStatusDataSet2.bv_Patients' table. You can move, or remove it, as needed.
this.procPatientList_AllInfoTableAdapter.Fill(this.patientStatusDataSet.procPatientList_AllInfo);I try to update the database when changes have been made to the data in the DataGridView, but cannot find what to use or how to do it. In the past I used to write my own code and could do updates. I am trying now to learn about the built-in functionality, but I am struggling. Neither
procPatientList_AllInfoTableAdapter
norpatientStatusDataSet
has any Update methods. Any assistance will be appreciated. Thanks. KobusDave Kreskowiak(CodeProject) tought me to Stop using wizards when am doing my Daatabase work. wizards have limitation and its not easy to debug if you did not write the code for yourself. i suggest you start writting your data layer so that you can see what is the Problem. as you said you use to write the code your self, why did you stop because its the best way of doing things, i have an Article that can get you started on how to update a Datagrid. http://www.codeproject.com/KB/cs/N-Tier22.aspx[^] Hope i Helped
Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/SQL7/2000/2005/2008 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@its.co.za