Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SaveDataSet
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
SaveDataSet
Divers
Thread ID:
00919851
Message ID:
00919851
Vues:
72
I have created a simple maintenance form that has one business object and several controls that are bound to the fields of the one table. The business object has a method that calls this.GetDataSet() with a SQL statement and returns a single record. The form displays fine, but I am having trouble saving.

If I call the business objects SaveDataSet() method, it appears to run fine and even return the correct return code that the save was sucessful, but the back end table is not updated?

I then changed the business object to register as primary business object and called the form's save() method. This works fine, but I am not sure why the SaveDataSet was not working. I would appreciate any ideas.

One problem that comes up when I make this the primary business object is an error when I attempt to close the form without saving. The framework responds with a prompt "Do you want to save changes? Yes, No, Cancel

If I select Yes, I get a .Net error, An Application Exception Occurred!

"Can not create a child list for field user1". If I click on the More button, the error seems to be coming from System.Windows.Forms.BindingContext.EnsureListManager. I know I can override this behavior with the AskSaveChanges() method, but I was wondering why the error does not occur on a manual save.

Thanks in advance for any help.

Kind Regards,

Mat
Matthew Kennedy
Decision Support Technology Inc.

"I try to take one day at a time, but sometimes several days attack me all at once." ~ Ashleigh Brilliant

New Jersey Dot Net User Group
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform