Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AddRow and defaults/nulls
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00771678
Message ID:
00771778
Views:
9
>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?
Previous
Reply
Map
View

Click here to load this message in the networking platform