In my application i have a web page where i have to answer nearly 60 sums. Each sum have a textbox(say txtSum1,txtSum2....) to answer. I have to insert these sums answer to Database. Normally how i do is (for 10 sums) i created 10 columns in a table and names as sum1,sum2,sum3.... ...and insert the sum1 answer to sum1 column and so...But for 60 sums it is not a good method.. plz tell me how to insert these 60 sums value to database(just tell me what are the colunms i needed. Should i create 60 columns or any other method).
It really depends on what you want to do with them later.
Since there are always 60 text boxes, (although that's a lot for a user to cope with in one go, I'd consider cutting them down to six pages of ten or so) I would probably go with the "60 columns in a row" approach, if I needed to do any arithmetic ot calculation on they values later. If I was just keeping them for reference, then I would probably use a single column, and concatenate the answers together into a single CSV value.
The only other approach is to have a whole separate table with a row per text box, each row having a ID linkiing it back to the original page row and some indication of the textbox number. Nasty, and wasteful.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)