Dovresti fare una query e verificare che il nome non ci sia.
La sai fare?

Roby