以下是引用cmy2006在2013-3-6 14:29:11的发言:
还有就是用APPEND FROM dbf(lcTmpDbfName)根本就没有导入数据
如果没出错,就要你自已检查了,只有你自己才清楚表里是什么的,还有你的表结构
还有就是用APPEND FROM dbf(lcTmpDbfName)根本就没有导入数据
public mypath mypath="" mypath=getfile("xls") if len(alltrim(mypath))=0 messagebox("你未选择任何表文件!",48,"提示") ELSE Import From (mypath) Type xls lcTmpDbfName=ALIAS() ac=Fcount(lcTmpDbfName) For m.lnI=1 To ac lcStr="Alter Table "+ "&lcTmpDbfName Rename Column "+Field(m.lnI)+" To "+Evaluate(Field(m.lnI)) &lcStr. ENDFOR USE bsc侧 EXCLUSIVE IN 0 zap APPEND FROM DBF(lcTmpDbfName) GO TOP DELETE PACK delete_name=dbf(lcTmpDbfName) use in (lcTmpDbfName) delete file (delete_name) messagebox("数据导入成功!",48,"提示") ENDIF为什么到了ZAP的时候,却是删的是IMPORT所生成的DBF表呢