----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: AnecdotalUmesh2Bad Message 2 in Discussion Hi You can generate a random number between 1 to no. of managers in the combo box. Subsequently you can check the random number is already used or not. You can do it by the following logic: 1. Declare one string variable 2. Store each random number generated into the string variable. For example, you have 10 managers in the combo box. You generate first random number as 5. So the string variable (say rNumbers) will be: rNumbers = "5" Next time you got 3, then add it like this: rNumbers= rNumbers+"," + "3" The comma can be used to split the number for checking purpose. 3. For each time, you are generating random number, check the generated number is existed in the string or not, if yes, then generate it again (this will in the loop). Once you get the unique number, you can grab the manager from the combox box on behalf of the random number generated = index in the combo box. 4. you can store then employee name and its manager id into dataset. Let me know if you have any questions. Umesh ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
