473,394 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Check the duplicate values in Dataset

Inbaraj
76
Hi..

I hava a set of records in Dataset. I want to check the duplicate values which is present in the dataset. Plz help me with sample code..

thanks in advance...

reg
Inba
Oct 16 '07 #1
5 2735
Shashi Sadasivan
1,435 Expert 1GB
hi,
Loop through your dataset and rescan it for any similar rows.
That would be your best option.

We will not be able to provide you with any code, (unless someone has a link to some site providing anything similar)
However if you do face issues while coding it, we will be glad to debug it for you.
(Cant expect someone else to do your job completely, can you?)
cheers
Oct 16 '07 #2
Hi,
You wil be fetching the values from the table rite? So u can give a proper query that tells to take only the distinct values to fill the dataset.
Or you can check(scan) ur dataset by a set of codes.

Thanks
Jeen
Oct 16 '07 #3
Inbaraj
76
Hi..

I have more then 1 lake records in my oracle DB. I want to insert nearly 100 records from datagrid to DB. The condition is that i have to check the duplicate record ie the datagrid record should be checked to DB if duplicate record found an error message should be displayed....

Can some one give me the idea how to solve this problum.... If possible help me with sample code....

Thanks in advance...

with reg
Inba
Oct 16 '07 #4
Motoma
3,237 Expert 2GB
Hi Inba,
I have merged your two threads which ask identical questions. This will prevent any confusion in the future, and allow experts to collaborate on answering your question, rather than being divided with some answering in one thread and others in another.
Motoma
Oct 16 '07 #5
Plater
7,872 Expert 4TB
Set a constraint on your table demanding that the recordset (say column2, column3 and column4) must be unique.
Then you CANNOT insert a duplicate record, and it will throw a nice exception that you can catch.
Oct 16 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: John J. Hughes II | last post by:
Normally when I use the Adaptor update function and it work fine but sometimes I get a "duplicate entry" error after the merge. I believe the problem is because the primary key is modified and the...
1
by: guoqi zheng | last post by:
I have a dataset with about 20-50 records on it. Some of has the same value for a key column, those duplicates need to be removed. How can I remove duplicate itmes from a dataset???? I know...
1
by: sianan | last post by:
I tried to use the following example, to add a checkbox column to a DataGrid in an ASP.NET application: http://www.codeproject.com/aspnet/datagridcheckbox.asp For some reason, I simply CAN'T get...
2
by: Brad Allison | last post by:
I have created a short routine to read certain data from an AS400 and put it into a small table stored in Access (I know not the best data store, but it is what we have for now). Anyway, some of...
4
by: FangQ | last post by:
hi I am very new to mysql. I have a question about using the "on duplicate update" clause with insert command. my table "data" has two columns, field1 and field2, where field1 is the index...
0
by: Zamael | last post by:
Currently I have a dataset that populates as follows (example data): ID Cycle Drug_Day Name 3 1 1 Initial 3 1 15 Initial 3 2 1 Initial 3 2 15 Initial 3 3 1 ...
0
by: =?Utf-8?B?TUNVU0E=?= | last post by:
I have a page using a ObjDataSource and a XSD Dataset. I use this to fill a datalist. I have drop downs that can change the values loaded and they are listed as the parameters for the...
3
by: rajeshkrsingh | last post by:
Hi friends, Step1- create table duplicate ( intId int, varName varchar(50) ) insert into duplicate(intId,varName) values(1,'rajesh') insert into duplicate(intId,varName) values(2,'raj12')...
3
by: Nimion | last post by:
Sorry if I posted in the wrong forum, but since I'm looking at VB code I have a 50/50 chance at being wrong. :) I've been trying a variety of methods to speed up the checking for duplicates. ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.