Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IsChanged() and multiple tables
Message
De
06/09/2007 13:03:20
Jeff Corder
Ambit Technologies, LLC
Missouri, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
IsChanged() and multiple tables
Divers
Thread ID:
01252820
Message ID:
01252820
Vues:
85
I have a WinForm for editing the Employees table . On the form there is a control for the supervisor (also from the Employees table). I create the form and create an additional employees table "Supervisor". I tie this table to the supervisor combo box.

I have discovered that Employees.IsChanged() does not show changes. I found that if I remark out the filling of the Employee.Supervisor table, it works correctly. As a test I left the Supervisor remarked out and ran the form. After making a change, I stopped at a break point and checked Employees.IsChanged(). Sure enough, it was true. I then opened the Supervisor table (this.FillDataSet(this.DataSet, SQLQuery, tableName, aParams)) and checked again. This time Employees.IsChanged() returned false.

I then tried
Employee.IsChanged(Employee.DataSet.Tables[0])
and it returned true. It seems that the IsChanged() is pointing at the wrong table.

I then realized that the CurrentTableName had probably changed (it had) so I set it back to 'Employees'. Employees.IsChanged() still returned false;

However, if I tried
Employee.IsChanged(Employee.DataSet.Tables[Employee.CurrentTableName])
it returns true.

Since the MM saving routines are using .IsChanged(), Not only can I not tell if the data changed, I can't even save it. Help.

Thanks,
Jeff
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform