Randomly generating number take 2
Posted on 2003-12-10
Hi i have managed to generate a three digit number randomly and populate it to a textbox. My application connects to a DB and populates a listview according to whats in the database. What i need to do now is to make sure that the randomly generated number doesnt already exist in the database. So basically i have text fields that let users enter clientID, firstname, lastname etc, from text boxes and upon pressing the save button, saves it to the database. So when i press the add button, my ClientID text field populates with a randomly generated 3 digit number, i just need to make sure it doesnt generate a number or client ID, already in the database....