我查出的数据存放到list里面然后接下来执行这个方法
public int AddChapter(IList<ZLChapterList> zlbookchapterlist)
{
int count = 0;
foreach (ZLChapterList zlc in zlbookchapterlist)
{
string sql = @" inster。";//就是一个才插入语句
SqlParameter[] para = new SqlParameter[]
{ (。。)//参数部分
new SqlParameter("@voluemeindex",zlc.Voluemeindex),
new SqlParameter("@imgflag",zlc.Imgflag),
new SqlParameter("@bookauthor",zlc.Bookauthor)
};
count = DBHelpercj.ExecuteCommand(sql, para);
}
return count;
}
循环遍历list里面的值,插入数据,执行下来的数据非常乱,但是我要是一步一步的走下去,就不乱,谁能帮我解决这个问题么?谢谢大家了
public int AddChapter(IList<ZLChapterList> zlbookchapterlist)
{
int count = 0;
foreach (ZLChapterList zlc in zlbookchapterlist)
{
string sql = @" inster。";//就是一个才插入语句
SqlParameter[] para = new SqlParameter[]
{ (。。)//参数部分
new SqlParameter("@voluemeindex",zlc.Voluemeindex),
new SqlParameter("@imgflag",zlc.Imgflag),
new SqlParameter("@bookauthor",zlc.Bookauthor)
};
count = DBHelpercj.ExecuteCommand(sql, para);
}
return count;
}
循环遍历list里面的值,插入数据,执行下来的数据非常乱,但是我要是一步一步的走下去,就不乱,谁能帮我解决这个问题么?谢谢大家了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货