本文介绍了我想更新有关数据网格中人员的信息吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

datagrid中列出的人员详细信息,所有信息均来自mysql.

我想单击一个按钮,所有人员信息都应一个接一个地更新.但这是行不通的.第一人称信息已成功更新,但第二人称信息无效,并显示连接打开错误.

persons details listed in datagrid and all information comes from mysql.

I want to click a button and all person information should update by one by one. But it doesn''t work. 1st person''s information is updated successfully but from 2nd person it doesn''t work and gives connection open error.

j=2;
row = grid1.Rows - 1;
for(i=1;i<row;i++)>
{
string id=grid1.cells(i,j).text;//this text contains person id

connection.open();
write sql query
..............
..............
..........where personid=id
connection.close();
}

推荐答案


这篇关于我想更新有关数据网格中人员的信息吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 20:31