bhawks (1) [Avatar] Offline
#1
Your section on using Designers 22.5 was really interesting.

I created a Component and added DataAdapters and a DataSet as per your example. I filled the dataset as per your example and all works fine. My components on the GUI are connected ok and showing the data in the DataSet

My application now does some changes in the dataset and I want to write these changes back to the database.

I tried to call UpdateChanges() in the DataSet and on each individual table in the Dataset, expecting the data to be automatically written back to the DB, but it was not.

I guess I need to provide a public method in the Component like SetTeacherDataSet(DataSet x). This method would then call the Update() Method for each DataAdapter in the Component to commit all changes back to the DB.

Is this the correct approach when using Designers and Components as per your example or can you recommend a more
elegant solution?

Thanks in advance for your advice