Home > Net >  No errors, but not update the database
No errors, but not update the database

Time:11-23

Private void Form1_Load (object sender, EventArgs e)
{
//TODO: this line of code to load data into the table "stationeryDataSet. Office_stationery", you can according to the need to move or delete it,
This. Office_stationeryTableAdapter. The Fill (this) stationeryDataSet) office_stationery);

}

Private void button1_Click (object sender, EventArgs e)
{
StationeryDataSet. Tables [r]. "office_stationery" Rows [0] [1]=maskedTextBox1. The Text;
StationeryDataSet. Tables [r]. "office_stationery" Rows [0] [4]=maskedTextBox2. The Text;
StationeryDataSet. Tables [r]. "office_stationery" Rows [0] [5]=maskedTextBox3. The Text;
Office_stationeryTableAdapter. Update (stationeryDataSet);
MessageBox. Show (" success ");
}
Only//all of them are dragged the code was written by himself but the pop-up window to the success of the database has no change,

CodePudding user response:

Wrote a quantity from our factory before submit the application to update is normal, but this time appear such circumstance, I built a project again, but still there is the question! No errors, the program runs when the data in the table is updated, but the program closed again after open the application data or the original data,
  •  Tags:  
  • C#
  • Related