Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AddRow and defaults/nulls
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00771678
Message ID:
00771778
Vues:
8
>Working with the DataColumn.DefaultValue won't change anything you're doing but it might save some code.
>http://www.dotnet247.com/247reference/msgs/18/91618.aspx

Yeah, that's just a different way of approaching hte same issue I suppose. Ultimately here we still have to manually set these things just as I am doing now (except I have it semi-automated).
>
>Also, (I haven't tried this) but what if you
>1. Set the default values in code
>2. Call DataSet.AcceptChanges that will reset the modified flag
>3. Make edits and update the dataset
>
>Do the SQL defaults stay set?

That might work, but then I'm still setting default values in code and that actually gets dangerous as you have to maintain defaults in two places - if they're out of sync you could be in real trouble...
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform