Alin Rusu
2008-11-18 19:37:12 UTC
I made a routine to check if use user left out a field on there import and add it if need be... I works on my system but when I deploy it to a customer, they error on the alter table line.
'name not unique in this context, restemp.DBF'
ALTER TABLE "IMPORT.dbf" ADD ADDRESS3 CHAR(30)
**************************************************
use import excl
x=0
DOIT=0
do while .t.
x=x+1
if field(x)='address3'
store 1 TO DOIT
endif
if x=200
exit
endif
enddo
USE
IF DOIT=0
ALTER TABLE "IMPORT.dbf" ADD ADDRESS3 CHAR(30)
ENDIF
*****************************************************
'name not unique in this context, restemp.DBF'
ALTER TABLE "IMPORT.dbf" ADD ADDRESS3 CHAR(30)
**************************************************
use import excl
x=0
DOIT=0
do while .t.
x=x+1
if field(x)='address3'
store 1 TO DOIT
endif
if x=200
exit
endif
enddo
USE
IF DOIT=0
ALTER TABLE "IMPORT.dbf" ADD ADDRESS3 CHAR(30)
ENDIF
*****************************************************