朋友你的代码有下面的错误:
for (int j = 0; j < CheckBoxList1.Items
[j].Count; j++)
{
if (CheckBoxList1.Items[j].Selected)
{
string update = "update 图书信息 set 状态='" + x + "' where 图书名称='" + CheckBoxList1.Items[j].
Value + "'";
SqlCommand command = new SqlCommand(update, connection);
command.ExecuteNonQuery();
}
}
[此贴子已经被作者于2007-9-10 22:59:23编辑过]