CHECK constraint in .NET framework

  • Thread starter Thread starter Greg Allen
  • Start date Start date
G

Greg Allen

SQL Server provides a CHECK constraint to insure the data in a column
falls within a specified set of values. From SQL Server Books Online:

CHECK

Is a constraint that enforces domain integrity by limiting the possible
values that can be entered
into a column or columns.

How is this type of constraint implemented in the framework? Or is it? I
am trying
to get an accurate schema from my table, but this constraint doesn't appear
on the
generated .xsd file when I call WriteXmlSchema.

Thanks,

-- Greg
 
AFAIK there's no direct equivalent. However you can trap events of the
datatable and implement it on your own.. or even use ExtendedProperties to
do it.

HTH,

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top