重新发一下,刚刚的额那个是有问题的,看下面的
public void tb_Traffic_InsertYear(int Year)
{
Getconn = new DatSrc_Con();
conn = Getconn.GetCon();
for (int month = 1; month < 13; month++)
{
string strCon = "insert into tb_Traffic values( " + Year.ToString() + " , " + month.ToString() + " ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)";
cmd = new SqlCommand(strCon, conn);
cmd.ExecuteNonQuery();
}
conn.Dispose();
}
public void tb_Traffic_InsertYear(int Year)
{
Getconn = new DatSrc_Con();
conn = Getconn.GetCon();
for (int month = 1; month < 13; month++)
{
string strCon = "insert into tb_Traffic values( " + Year.ToString() + " , " + month.ToString() + " ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)";
cmd = new SqlCommand(strCon, conn);
cmd.ExecuteNonQuery();
}
conn.Dispose();
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货