I have a ListBox control that allows multiple selections, what is the best field data type to use to save the selected data in SQL 2005 E?
Thank you,
what is the data? Typically you use an Int (or other ID type field) to hold the id for the item(s).The value to store can be numeric, the user will see a text description.
Hi,
Well, yes... the client is only seeing the .text description, and won't see whatever the value is. Now, you can store in the Value numeric or string data, whatever makes it easier to the primary key from you DB table.
Also you can use a single row in the database to store the entire selection of the user. Something like this:
1,4,5,7
This will save your database size as you dont have to save the items selected by a user on multiple rows.
Thank you guys for all your help.
0 comments:
Post a Comment