primary key must be unique..

Y

Yvonne Scherer

Hi.
I want to set a column of my datatable to primary key.
If this column has not unique values I get an exception.
How can I check the values of the column? Is there a property
which tells me, if the values in the column are unique or not?

Thanks
Yvonne
 
M

Mary Chipman

I don't know if there's an easy way to test after the data is loaded,
but you can ensure that you only get unique values by using a SELECT
DISTINCT instead of plain SELECT when you load the data from the data
source.

-- Mary
MCW Technologies
http://www.mcwtech.com
 

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

Top