#2
吹水佬2024-06-11 21:15
|
只有本站会员才能查看附件,请 登录
在表单中运行一段程序
点击红框1后,再点击红框2
THISFORM.Label2.CAPTION=" "
SET SAFE OFF
SELECT 0
fn1=GETFILE('DBF','打开报名库')
USE (fn1) ALIAS gkbmk
UPDA jian SET jian.axm=gkbmk.xm FROM gkbmk WHERE jian.sfzh=gkbmk.sfzh &&&&按sfzh导入姓名axm
UPDA jian SET jian.aksh=gkbmk.ksh FROM gkbmk WHERE jian.sfzh=gkbmk.sfzh &&&&按sfzh导入考生号aksh
SELECT jian
REPLACE ALL j3 WITH '姓名不一致' FOR xm<>axm
REPLACE ALL j4 WITH '考生号无法导入' FOR aksh=' '
COUNT FOR j1<>' ' OR j2<>" " OR j3<>" "OR j4<>" "OR j5<>" " TO nn3
THISFORM.Label2.CAPTION="检查各类错误数: "+ALLTRIM(STR(nn3))+" 人"
IF nn3<1
RETURN
ELSE
ask=MESSAGEBOX('是否浏览并导出',1+32+0,'返回')
IF ask=1
BROWSE FOR j1<>' ' OR j2<>" " OR j3<>" "OR j4<>" "OR j5<>" "
wjm="导出4检查出各类错误数-"+TRANSFORM(nn3)+"条数据"
COPY TO &wjm FOR j1<>' ' OR j2<>" " OR j3<>" "OR j4<>" "OR j5<>" "
COPY TO &wjm FOR j1<>' ' OR j2<>" " OR j3<>" "OR j4<>" "OR j5<>" " TYPE XL5
ELSE
RETURN
ENDIF
ENDIF
if used (fn1)
use in (fn1)
endif
没起到关闭数据的作用,用sele gkbmk;use gkbmk也不可以
在不退出这个表单程序的情况下再次运行红框2,总是弹窗提示“文件正在使用”,卡在fn1=GETFILE('DBF','打开报名库')处,如果放在SELECT 0的前面,则提示文件不存在,问题出在哪里了?
[此贴子已经被作者于2024-6-11 20:12编辑过]