i am converting an asp application into asp.net. when a team gets nominated they would like to select the whole team (upto 10 members) and enter the nomination details once. at the moment they would have to enter it upto 10 times!! so i have to combine the normal web input with the multi-select or radio buttons. i am getting very frusrated since there is not alot of info on this subject around.
your assistance would be appreciated!!
here is my code so far:
string sqlStatement = string.Empty;
sqlStatement = "INSERT INTO Table_1 (people) VALUES";
sb.AppendFormat("{0}('{1}'); ", sqlStatement, item);
sqlStatement = "INSERT INTO Table_1 (UserId) VALUES (@Userid)";
sb.Append(sqlStatement + " ;");
This now produces two records per person:
| Joe Bloggs | NULL |
| NULL | 12235 |
i need to combine this information:
| Joe Bloggs | 12235 |
Thank you so much!!
JoePosted Mar 4, 2010, 7:44 AM
let me start at the begginning. its a recognition system. so i would log on and send you a recognition. the complication comes when you want to recognise a group of people. currently if the group has 5 members, you would have to nominate each member individually.
what has been proposed is that the group nomination must only be done once. so you would be presented with a list of employees in the department. you would then select the 5 people and complete the rest of the form and then save it to the database.
i am having trouble combining the multi-select and the rest of the form into one record in the table (only 1 table where record is saved). i would like to combine the two INSERT INTO statements but i have no idea how to do this.
Amit ChoudharyPosted Mar 4, 2010, 4:25 AM
As much i understood, you are inserting in two different tables.. and both tables have no relation or common field.
it not much clear to me.. please give the details of the tables... exactly how they are?? and what you want?