jkeywo

jkeywo

  • NA
  • 1
  • 0

Updating Data Source

Nov 18 2004 9:30 AM
I have a data source I'm trying to update from a form. I've set up a Dataset based on the source and sucessfully bound the form controls to the data set. I've then managed to fill the set with the data I want and it displays correctly on the screen. The problem comes when I come to wanting to update the data source from the data set. patientAdapter.Update(PatientSchema) PatientSchema.AcceptChanges() patientAdapter is a DataAdapter based on the Patient Table in the Data source. I've already used it to sucessfully extract data from the database. PatientSchema is an instance of a Data Set that contains the patient data and is bound to the form controls. Unfortunatly this doesn't work, neither does this... patientAdapter.Update(PatientSchema.GetChanges) PatientSchema.AcceptChanges() The first example returns no error and the second throws an exception that 'PatientSchema.GetChanges' is Null. Does anyone know how to solve this problem? Thanks in advance. John,

Answers (2)