Arrays of Contants - is this possible?
Posted on 2004-11-11
I would like to do something like this pseudo code - Does anyone have any suggestions
OrderTypeID as integer
name as String
value as integer
Enum MovementOption As OrderType
CounterSale = 1, "Counter Sale", 10
InternetSale = 2, "Internet Sale", 20
MailOrder = 3, "MailOrder", 30
I have a column in a data base table which is an OrderType field which stores 1, 2 or 3 ie counter, internet or mail order. I would then like to be able to do something like this later
dim myOrderType as OrderType
myOrderType.OrderID = retrieved from database field
set somevalue = myOrderType.Name
set othervalue = myOrderType.value
I guess what I am after is some method of retrieving the Name and Value from the ID. All these values I want hard coded into the program.