写了一个修改数据后操作未保存的响应提示代码。有个小问题~~~~
出现提示框,点”否“的时候,会再出现一次提示。
代码如下:请帮忙修改一下
int li_no
dw_1.accepttext();
if dw_1.deletedcount()+dw_1.modifiedcount()>0 then
li_no=messagebox("警告","你已经修改了数据,是否存盘",question!,yesnocancel!)
choose case li_no
case 1
if dw_1.update()=1 then
commit using sqlca;
close(parent)
else
rollback using sqlca;
messagebox("错误","写入数据库时发生错误,请检查")
return 1
end if
case 2
close(parent)
case 3
return 1
end choose
else
close(parent)
end if