So What about like States (AK, AL, CA, etc.)?
Do you store states in the database or code?
"Peter van der Goes" <(E-Mail Removed)> wrote in message
news:%23bX$(E-Mail Removed)...
>
> "Leon" <(E-Mail Removed)> wrote in message
> news:O74Xa%(E-Mail Removed)...
>> What is the best way to store small sets of look-up data for my web
>> application in the database (sql2000) or in a dropdownlist control in my
> web
>> form?
>> Or is it a question of how much data I want to type over and over again.
>>
>> Example:
>> TableName - YearMonths
>> MonthID (1, 2, 3, 4, etc)
>> YearMonth (Jan, Feb, Mar, Apr, etc)
>>
>> TableName - Gender
>> GenderID (M, F)
>> Description (Male, Female)
>>
>> TableName - MonthDate
>> MonthDate (1, 2, 3, 4,......31)
>>
>> Note: All Interaction with the database is done from the web Interface.
>>
>> Thanks!
>>
>>
> One way to look at it is persistence. If the lookup values can change
> between program runs, then the values should be stored in your database
> and
> updated as necessary. If (as in your examples) the values are truly
> constant, and very unlikely to change over time, then putting them
> directly
> in your dropdown lists makes sense.
> For example a table of local sales tax rates within a state should be in a
> table, as rates change over time. The value of PI and e, OTOH, can be in
> your code.
>
> --
> Peter [MVP Visual Developer]
> Jack of all trades, master of none.
>
>
|