📄 check_id.prg
字号:
sele id from history where .t. into table TempID
sele tempid
appe from thisday field id
pack
clos data
sele id from tempid where .t. into cursor TempSortID order by id
sele tempid
use
dele file tempid.dbf
sele TempSortID
current_id=0
go top
do while .not.eof()
field_id=id
if field_id>current_id
current_id=id
skip
else
ans=messagebox("历史库及当前库中的唯一编号出现不唯一的错误!"+chr(13)+chr(13)+"是否修复此错误?",4+16,"错误")
if ans=6 && 选择是
use history in 0
sele history
repl all id with recn()
nHisRecc=recc()
use
use thisday in 0
sele thisday
repl all id with recn()+nHisRecc
cur_id=recc()+nHisRecc
use setup in 0 share
loca for allt(name)=="帐号" and id=999
if found()
repl code with allt(str(cur_id))
else
messagebox("文件 setup 中无ID=999!",16,"错误")
endif
clos data
messagebox("请重新运行此程序再次检查!",64,"修复完毕")
cancel
else
messagebox("不解决唯一性错误,程序不能正常运行,将退出!",48,"那你就不要用了")
clos data
cancel
endif
endif
enddo
retu
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -