Solved

Checking for duplicate columns in a dataset

Posted on 2006-07-11
2
150 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now