I am creating 12 character randomly generated "Certificate Codes" for security. I need to add these codes to a table and ensure no duplicates in monthly batches of 10,000 codes (each month adding 10,000 new unique codes).
What is the most efficient way to add these codes to the table while ensuring that it is not a duplicate? If the code is a duplicate, how do I skip that code while ensuring the batch still has 10,000 new unique codes created?
Please follow the link below to what I have created so far. It seems like there should be a better way to do the adding of the new certificate code. As my table grows with valid certificate codes, the lookup for duplicates will take longer and longer. I would appreciate any comments on the best way to attack this issue. If you would do something different, let me know.
(ASP code)
Thanks,
Magnus
What is the most efficient way to add these codes to the table while ensuring that it is not a duplicate? If the code is a duplicate, how do I skip that code while ensuring the batch still has 10,000 new unique codes created?
Please follow the link below to what I have created so far. It seems like there should be a better way to do the adding of the new certificate code. As my table grows with valid certificate codes, the lookup for duplicates will take longer and longer. I would appreciate any comments on the best way to attack this issue. If you would do something different, let me know.
(ASP code)
Thanks,
Magnus