dafeng1230 dafeng1230
关注数: 1 粉丝数: 3 发帖数: 267 关注贴吧数: 4
求助:代码解释 我解释了一部分 请补全谢谢 LPARAMETERS filenametalkcurrenstatus=set('talk')&&记录当前set talk 的状态safecurrenstatus=set('safety')&&记录当前set safety 的状态set talk off &&接收VB调用的文件名称,指明所对应的作用源表set safe off if used('projectinfo')sele projectinfoelsesele 0use projectinfoendifgo topcCurrentSyspath=alltrim(syspath)&&读到当前系统路径cCurrentDataPath=alltrim(datapath)&&读到当前项目数据路径cfullname=cCurrentDataPath-allt(filename)cCurrentDatabase=cCurrentDataPath-'db6.dbc'talkcurrenstatus=set('talk')&&记录当前set talk 的状态safecurrenstatus=set('safety')&&记录当前set safety 的状态currentdb=dbc() &&得到当前的数据库if right(currentdb,7)<>"db6.dbc" &&如果当前库不为db6open data '&cCurrentDatabase'endif if used('fieldnc')sele fieldncelsesele 0use fieldnc excluendifsele fieldncdele allpackif used('&filename')sele '&filename'elsesele 0use '&cfullname'endif**i=fcount() &&得到字段的个数copy stru to fieldstru.dbf exte &&把该作用源表的结构拷到fieldstru中去。if used('fieldstru')sele fieldstruelsesele 0use fieldstruendifgo topdo while .not.eof()m_fandfname=filename-"."-alltrim(field_name) &&得到带表名的字段名 m_fieldname=alltrim(field_name) &&得到带表名的字段名sele '&filename'm_fieldcaption=dbgetprop('&m_fandfname','field','caption')sele fieldncappe blankrepl fandfname with m_fandfname,fieldcap with m_fieldcaption,fieldname with m_fieldnamesele fieldstruskipenddoset talk &talkcurrenstatus&&恢复程序开始时set talk 的状态set safety &safecurrenstatus&&恢复程序开始时set safety 的状态clos data all
1 下一页