| 发表于:2007-08-07 17:46:40 楼主 |
private sub cmd_del_click() dim a as string a = msgbox( "你确实要删除这记录吗? ", vbokcancel) if a = vbok then with vsg1 .removeitem (vsg1.row) .refresh end with vsg1.refresh adodc1.recordsource = " select * from yhdlb where dh = ( " + vsg1.textmatrix(vsg1.row, 1) + ") " if adodc1.recordset.recordcount > 0 then adodc1.recordset.delete adodc1.recordset.update command1.enabled = true vsg1.refresh set vsg1.datasource = adodc1 end if end if end sub 代码如上 :数据已被删除,而vsflexgrid里的项目却没有却删除,只有等到重新初始化时才不见了!是不是由于绑定的缘故吗??? |
|
|
|
|