Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Force DataSet.HasChanges to True
Message
De
31/01/2010 15:18:18
 
 
À
31/01/2010 12:56:00
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
C# 3.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01446548
Message ID:
01446758
Vues:
38
>>I have a DataSet that I want to save to a different source than it was retrieved. I need to set the HasChanges to true even though it wasn't modified in order to complete my save. Anybody know how I can do that?
>
>I usually make a fake change:
>
>
>ds.Tables[0].Rows[0][0] = ds.Tables[0].Rows[0][0];
>ds.Tables[0].Rows[0].EndEdit(); // may or may not be necessary, do it anyway
>
>
>~~Bonnie

You could be in trouble there if Tables[0] has no rows :-}

But anyway, by definition, all of the other Rows in all of the other Tables will still be 'Unchanged'. I think Tim needs to explain what he expects to happen to this data in relation to the new destination - won't the rowstate for each row have to depend on whether that row exists in the new destination?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform