Primary column constrain programmatically

  • Thread starter Thread starter Aamir Ghanchi
  • Start date Start date
A

Aamir Ghanchi

How can I add Primary column constrainst on a DataTable
Column in the program (C# or VB). Is the Unique property
on DataColumn same as Primary cpnstraint.

I need this because I need to Find() values in a
DataColumn which is not a primary column in the
DataSource. I want to make it a primary coulmn on the fly
and search through it. What other option do I have to
search through a column which is not a Primary column
besides iterating through the DataRowCollection.

thanks

Aamir
 
Back
Top