Solved

Checking for duplicate columns in a dataset

Posted on 2006-07-11
2
153 Views
Last Modified: 2010-04-23
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?

Thanks.
0
Comment
Question by:kiranboi
2 Comments
 
LVL 17

Accepted Solution

by:
ZeonFlash earned 500 total points
ID: 17081476
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?
0
 

Author Comment

by:kiranboi
ID: 17081612
Oh nevermind. If it checks when its importing anyway it doesn't matter.
Thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question