回复 7楼 easyppt
这是添加好的完整代码,但是没什么反应,请帮我看看哪里有问题
Close Dbf
Adir(myarray,'*.dbf')
For lnX = 1 To Alen(myarray,1)
lcFileName = Juststem(myarray(lnX,1))
If !Used(lcFileName)
Use (lcFileName) In 0 Excl
Endif
If !Empty(Field('xuhao',lcFileName))
Alter Table (lcFileName) Drop Column xuhao
Endif
If !Empty(Field('fs',lcFileName))
Alter Table (lcFileName) Rename Column fs To mf
Alter Table (lcFileName) Alter mf N(3,0)
Endif
If Empty(Field('bit',lcFileName))
Alter Table (lcFileName) Add Column bit N(1)
&& Default 1
Repl All bit With 1
Endif
If Empty(Field('xxdf',lcFileName))
Alter Table (lcFileName) Add Column xxdf N(8,3)
&& Default 1
Repl All xxdf With 0.000
Endif
If Empty(Field('bfdf',lcFileName))
Alter Table (lcFileName) Add Column bfdf N(8,3)
&& Default 1
Repl All bfdf With 0.000
Endif
If Empty(Field('sxkf',lcFileName))
Alter Table (lcFileName) Add Column sxkf N(8,3)
&& Default 1
Repl All sxkf With 0.000
Endif
If Empty(Field('dkf',lcFileName))
Alter Table (lcFileName) Add Column dkf N(8,3)
&& Default 1
Repl All dkf With 0.000
Endif
If Empty(Field('emu',lcFileName))
Alter Table (lcFileName) Add Column emu N(1,0)
&& Default 1
Repl All emu With 0
Endif
If Empty(Field('zdf',lcFileName))
Alter Table (lcFileName) Add Column zdf C(100)
&& Default 1
Endif
*
添加其他字段的方法一样,自己加吧...
Endfor