By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,667 Members | 1,219 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,667 IT Pros & Developers. It's quick & easy.

accessing columns default value

P: n/a
How do I get a columns default value into a type dataset in C#?? I see a
method for setting
columns to null but default values must be easier to get to than it seems.

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Tim,

It actually isn't. You can't get the default value in a
provider-agnostic way, because there is no infrastructure yet to access the
table schema through ADO.NET. You can get it through ADOX (a COM object)
most likely, but there is not a completely managed solution to this.

Of course, if you are using just one database solution and the provider
supports it, or you can query the server for it, then you can do that.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Tim Greenwood" <ti***********@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
How do I get a columns default value into a type dataset in C#?? I see a
method for setting
columns to null but default values must be easier to get to than it seems.

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.