SterlingMcClung
asked on
Typed Dataset and Enum States
I have a simple database that has a customers table. One of the fields is for the state in which the customer resides. I was wondering if I put a states table in, with all the state names and abbreviations, if there was a way to create code so that I could do the following:
dim myCustomerTable as new CustomersTable
myCustomer.Item(0).State = States.Florida.FullName
Or simply
myCusomer.Item(0).State = States.Florida
I can see this being possible strictly in code using some sort of enum field, but I would like the possible values to come from the table in the database not from code.
It seems like this would be a very convenient thing to have happen, but I have not been able to find a way to do this myself.
Sterling
dim myCustomerTable as new CustomersTable
myCustomer.Item(0).State = States.Florida.FullName
Or simply
myCusomer.Item(0).State = States.Florida
I can see this being possible strictly in code using some sort of enum field, but I would like the possible values to come from the table in the database not from code.
It seems like this would be a very convenient thing to have happen, but I have not been able to find a way to do this myself.
Sterling
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.