看看这段转换代码为什么越跑越慢啊?
public partial class RunWebIDApp : Form
{
public RunWebIDApp()
{
InitializeComponent();
}
private void btn_run_Click(object sender, EventArgs e)
{
IList <myApp> list = new List <myApp> ();
SqlConnection conn = new SqlConnection( "server=.;uid=xiaoyi;pwd=123;database=CNKI ");
SqlCommand comm = new SqlCommand( "select svrUrl,svrAutoID from svr_Info ", conn);
conn.Open();
using (SqlDataReader rdr = comm.ExecuteReader())
{
while (rdr.Read())
{
myApp app = new myApp();
app.url = rdr.GetString(0);
app.autoID = rdr.GetInt32(1);
list.Add(app);
}
}
foreach (myApp myapp in list)
{
comm.CommandText = string.Format( "update classLink set webID={0} where svrUrl= '{1} ' ", myapp.autoID, myapp.url);
int i = comm.ExecuteNonQuery();
&n