multiple db updates:


replaces question:



here's formula dash transform an hearing law set.
db structure given, nonetheless i quarrel stored procedures inclusion (which pain modify, i save until end.)



the question: there improved proceed controlling sql server v 2005.,net 2.0 ?



string transform = @"update dbo.studentanswers 
set answer=@answer
where studentid =@id questionnum =@qnum";
sqlcommand updatecommand = new sqlcommand( update, conn );
conn.open();

twine uid = session["uid"].tostring();
(int i= tempstart; i <= tempend; i++)
{
updatecommand.parameters.clear();
updatecommand.parameters.addwithvalue("@id",uid);
updatecommand.parameters.addwithvalue("@qnum",i);
updatecommand.parameters.addwithvalue("@answer", request.form[i.tostring()]);
try
{
updatecommand.executenonquery();
}
locate { }
}


Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members