|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Finding if a column is unique in a datasetI have a dataset that has megs of data. I want to know if there is a
way to find out if data in a particular column is unique or not. Does the dataset or a datatable have a built in function that i can use? Thanks DataColumn.Unique
But it is only going to be set to Unique if you have set it that way, or if it was auto-generated that way in your dataset schema. How are you filling your dataset, and is it strongly typed? Thanks. No, the dataset is not strongly typed and I am filling the
dataset from a datasource and I am not sure if this datasource has any unique constraints on the data. Ok, I am doing this:
bool isUnique = data.Tables["Item"].Columns["Number"].Unique; Now, if isUnique is false, is there a way to find out the value of the item that's duplicate?
Other interesting topics
How to set build order?
32-bit signed int to 16-bit unsigned int Size by reference and by value Weird issues with DataGrid picture compare Enterprise Library Application Blocks question... Help Passing TreeView to another form and then back Editable DataGrid with DropDownList Question Blogging sites |
|||||||||||||||||||||||