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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert record > preventing duplicates..

Status
Not open for further replies.

aamaker

Programmer
Joined
Jan 20, 2002
Messages
222
Location
US
I am using DW MX's ASP function for "record insertion form" in order to write new registrant data (name, username, password) to an access database.

I would like to know if theres an easy way to modify this so that duplicates are not allowed ...

for instance is there an easy way to loop through all the 'usernames' in the db field/column to look for any instance of the pending submission, then if it IS found in the db already, the user is PREVENTED from adding the same username again and gets a response.write message alerting them.

On the other hand, if the username is NOT found in the db, then the record insertion takes place.

Any one know of a way this can be integrated or another way outside of the record insertion code built into DW MX? Any tutorials based on classic ASP would be really helpful!

Thanks.
 
Just pull a recordset based on the user name requested and put the insert record behaviour into an if statement. So if there are no records do the insert if a record exists dont

Cheech

[Peace][Pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top