Checking for duplicate columns in a dataset

Hi All,

I have a dataset in my app that is populated with dynamic data using a DataAdapter. I need a piece of code that will check the names of the columns that have been imported and display a MessageBox if duplicates are found. Can anyone help?

Who is Participating?
ZeonFlashConnect With a Mentor Commented:
Column names in DataColumns must be unique.  How are you getting 2 columns with the same name into the table, without it throwing an error in the first place?
kiranboiAuthor Commented:
Oh nevermind. If it checks when its importing anyway it doesn't matter.
All Courses

From novice to tech pro — start learning today.