Pelumi Eluyera

Pelumi Eluyera

  • NA
  • 24
  • 8.5k

Update records from Local database Desktop application.

Mar 31 2015 9:29 AM

Afternoon, I am unable to update records from a database with this code. 

Here is the code I have tried  and does not work .If you could point me in the right direction that will be appreciated. 



private void UpdateDatabase_Clock (object sender, EventArgs e)
{

DialogResults update;

update = MessageBox.Show ("Are you sure you want to update this record" "Delete Record" , MessageBoxButtons.OKCancel);

if (update == System.Windows.Forms.DialogResults.OK)


{

Try

{ tbl_AppointmentsTableAdapter.update(this.datasetnumber1.TBL_Appointments);
tbl_EngineerTableAdapter.Update (this.datasetNumber1.TBL_Engineers);

_selectedAppointmentRow = null;
}


catch (Exception ex)
{
MessageBox.Show("Unable to delete the record due to the following error; " + ex.Message);


}
}
}

Answers (1)