Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Removing Duplicate Entries


Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2003, 03:52 AM
RemoteHoax RemoteHoax is offline
Centurion
 
Join Date: Sep 2002
Location: Chandigarh
Posts: 143
Default Removing Duplicate Entries


Hello!

I have made a small program which checks for duplicate entries from a single database and removes the duplicate entries if found. Now i think i am doing it the hard way and want to know that how can the program be made more fast and efficient.

I am hereby attaching the program i created.

Thanks!
Attached Files
File Type: zip duplicate.zip (11.2 KB, 2 views)
__________________
Holla! If ya hear me!
Reply With Quote
  #2  
Old 02-25-2003, 04:41 AM
candela's Avatar
candela candela is offline
Senior Contributor
 
Join Date: May 2002
Location: Roma
Posts: 838
Default

u delete a duplicate if there's the same date of birth?
that's not a so good thing i think

i think that's better to use a query instead of the second For:
Set RSa = DBa.OpenRecordset("SELECT CustData.* FROM CustData WHERE (CustData.ID <> '" & RS.fields("ID") & "') AND ((CustData.Name = '" & RS.fields("Name") & "') OR (CustData.Phone= '" & RS.fields("Phone") & "') OR (CustData.DateOfBirth= '" & RS.fields("DateOfBirth") & "'))", dbOpenTable)

or if u want to delete the directly use Delete insetad of Select

hope this can help u
__________________
_ _ . _ ._. _._. _ _ _ ._._.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->