April 16, 2009 at 4:40 am
HI Everyone,
Im designing a table which has items that will vary in colour,size ,wood etc. Is it possible to have a enum arrangement for a column in a datatable?
ta
April 16, 2009 at 5:06 am
yes and no.
you can create a table with the a primary key and the list of possible values.
then in the main table, you store the key from that table as a foreign key.
when you query the data, you have the option of joining the table with the lookup so you get the description.
When you are entering the data, the actual selection would need to come from a presentation layer, nothing native to SSMS, for example.
I use DeveExpress grids in my .NET application,which natively support replacing the normal text editing cell with any kind of Edit Control...a drop down menu, calendar date picker, many other options....in the case of a lookupedit drop down, i change it's data source to the lookup table, it it allows the user to select by name, but stores the data with the key.
vidhyasudha (4/16/2009)
HI Everyone,Im designing a table which has items that will vary in colour,size ,wood etc. Is it possible to have a enum arrangement for a column in a datatable?
ta
Lowell
April 17, 2009 at 10:34 am
You may want to check out the below link
http://www.sqlservercentral.com/articles/Miscellaneous/3174/
April 18, 2009 at 2:08 pm
Thank you for your response. It did certainly help.
Vids
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply