|
-
Jul 31st, 2015, 03:39 PM
#1
Thread Starter
Member
Generating a unique fixed-length hash in VB6
Hello, all!
I've been researching this for a while now, and I'm still not coming up with exactly what I'm looking for. Perhaps I'm just being dense, but I can't seem to translate any of the answers I've found into an actual, workable solution for my current situation.
I need to generate a unique ID that can be stored in a database to retrieve a specific record with the following requirements:
- Unique
- Non-Sequential
- Fixed-length of 10 characters (The specific length could potentially change before final implementation of the solution, depending on what the "higher-ups" decide they want. Of course, if it were to change, it would probably be to decrease the length unfortunately)
- Alphanumeric (preferably upper-case only)
- VB6 (I know, I know...)
The "input" available for generating this code is comprised of at least three separate elements:
- Customer number (fixed-length)
- Account number (variable-length)
- A specific date
These three elements should ensure the uniqueness of the record to which the generated ID is tied.
The overall objective is to provide a user with this code on a printed and mailed notification letter. The user will be able to enter this code on our company's Web site for submitting information back to us. The unique aspect is important to ensure that no two users receive the same code, thereby submitting information which is tied to the wrong data record.
I could potentially exclude the date from the above "input" values, but I'm including it at this point to ensure that, even if we send multiple notification letters to the same individual (customer number & account number), we will always pull the correct database record (our company will never send two notification letters to the same individual on the same day). If necessary, I could potentially include additional data elements for input, but I fear that this could cause even more problems than it solves.
I'm sure I could bang my head on my desk for a while longer and eventually work something out, but my brain is starting to hurt with all of the search results I've reviewed so far. I was wondering if someone here could help point me in the right direction for finding a viable solution. Thank you in advance for all of your assistance.
Last edited by G_Hosa_Phat; Jul 31st, 2015 at 04:09 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|