accessing columns default value

  • Thread starter Thread starter Tim Greenwood
  • Start date Start date
T

Tim Greenwood

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.
 
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.
 
Back
Top