Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating non-bound fields
Message
 
À
25/06/2007 07:37:56
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01235174
Message ID:
01235523
Vues:
17
Tony,

>Ah, updating the dataset, that's what I'm asking for, I think.
>
>I have unbound fields in my table (they don't exist on the form). I need to push new data in these fields into the dataset so that when the dataset is saved to the the SQL server they get saved too.
>
>What is the syntax to update the dataset? Can't seem to find it anywhere in the manual.

If you're using untyped data you can change data in a DataTable like this:
ds.Table["MyTableName"].Rows[0]["MyColumnName"] = value;
If you're using MM .NET entity objects (the preferred approach), you can store information in the entity object like this:
MyEntity.MyProperty = value;
Then when you call SaveDataSet(), SaveEntity() or SaveEntityList() the changes are persisted to the back end.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform