G
Guest
Hi,
I am wondering what the best solution is to solve the following problem:
I have a table for instance employers and a second table employer_types. The
second table consists of two fields Type_Name and Type_ID.
in the employer table I store only the Type_ID
Now for the user interface I want to add a listbox, filled with the
employer_Types.Type_Name.
The Question now is what is the best way to get the Type_ID.
Ofcourse the simples way is to lookup the Type_name in the Table and get the
Type_id.
Another option in my opinion is to create a Hashtable if I want to store
than just the ID with the Name as a Keyfield. Drawback here is that the Names
need to be unique I guess. Alternatively I can creatte an Array and lookup
the value in there.
As I am not very experienced with this type of situations I am wondering if
there are any alternatives to do what I want, for instance a second value I
can populate in the listbox, or something completely different.
What are the "industry standards" here
Thanks for any advice
DJ
I am wondering what the best solution is to solve the following problem:
I have a table for instance employers and a second table employer_types. The
second table consists of two fields Type_Name and Type_ID.
in the employer table I store only the Type_ID
Now for the user interface I want to add a listbox, filled with the
employer_Types.Type_Name.
The Question now is what is the best way to get the Type_ID.
Ofcourse the simples way is to lookup the Type_name in the Table and get the
Type_id.
Another option in my opinion is to create a Hashtable if I want to store
than just the ID with the Name as a Keyfield. Drawback here is that the Names
need to be unique I guess. Alternatively I can creatte an Array and lookup
the value in there.
As I am not very experienced with this type of situations I am wondering if
there are any alternatives to do what I want, for instance a second value I
can populate in the listbox, or something completely different.
What are the "industry standards" here
Thanks for any advice
DJ