Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

discarding the same

Status
Not open for further replies.

2cxc

Programmer
Aug 29, 2003
245
CA
I hope i'm not in the wrong forum..?

I was wondering how one could get access to not accept duplicate enteries in the same column? The db is on-line and is being updated via ASP, if that matters. So basically i want the db to siliently not add the value to the column if the exact value is the same, the column is IPaddress and the values are of an IP format. Also would it actually be quicker to pull the record set by distinct than to set the db to not accept duplicate values?

Thanks
 
Hi

Just set a unique index on that column

depending on how you are doing the update, you may also need to trap and discard the resulting error message, cannot guide you on this, without knowing the mechanism you are using to do the update

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top