enums as data type in datatable

T

Tim Marsden

Hello,

Is the any way I can define a enum as a data type in a datatable.
For example if I have a column which represents 'North','South','East,'West'
and I want to store 0,1,2,3 in the database.

So when updating the column value in vb.net I want to be presented with the
valid values to choose from not have to remember the value of North etc.

Also if I show the data in a datagrid I want it to show the description not
the number.

Thanks
 
R

Rajesh Tiwari

you can store the enum values in a master table with id,value fields and
then use Foreign key relationship between two tables.

Rajesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top