Check for duplicate before insert
I was wondering if there is any simple guide or tutorial on how to implement a check to prevent a simple form from inserting its values to the database if there is a duplicate?
I created an simple insert form and set in my database the 'name' column to be unique.
I used a DataAssist insert behavior to insert the form values into the database.
How can i make the insert behavior to first check the 'name' field for duplicates before really inserting and if there is already a dulicate to show the message that the name already exist and need to choose another name.
Does this involve handcoding or does DataAssist has such feature inside to check first.
I hope someone can give some easy tutorial how to do this.