Hola:
Tengo una dbf con datos y me gustaría añadir nuevos campos, pero no he encontrado la función.
Muchas gracias.
USE(HTER) EXCLUSIVE NEW ALIA HTER //Para cambiar la estructura en tiempo de ejecución.
IF !NETERR()
StruVieja:=DBSTRUCT()
StruNueva:={{"HTCODIGO","C",10,0},{"HTNOMBRE","C",35,0},{"HTARREND","C",35,0},{"HTIDENTI","C",10,0},;
{"HTDIRECC","C",40,0},{"HTCORREO","C",40,0},{"HTSDOINT","N",12,2},{"HTINTANO","N",12,2},;
{"HTINTPAG","N",12,2},{"HTCUOTAS","N",12,2},{"HTPARQUE","N",12,2},{"HTARRIEN","N",02,0},;
{"HTCTAANT","N",12,2},{"HTADMSDO","N",12,2},{"HTADMDEB","N",12,2},{"HTADMCRE","N",12,2},;
{"HTAGUSDO","N",12,2},{"HTAGUDEB","N",12,2},{"HTAGUCRE","N",12,2},{"HTLUZSDO","N",12,2},;
{"HTLUZCRE","N",12,2},{"HTLUZDEB","N",12,2},{"HTEXTSDO","N",12,2},{"HTEXTDEB","N",12,2},;
{"HTEXTCRE","N",12,2},{"HTOTRSDO","N",12,2},{"HTOTRDEB","N",12,2},{"HTOTRCRE","N",12,2},;
{"HTMULSDO","N",12,2},{"HTMULDEB","N",12,2},{"HTMULCRE","N",12,2},{"HTPARSDO","N",12,2},;
{"HTPARDEB","N",12,2},{"HTPARCRE","N",12,2},{"HTREGIST","N", 5,0},{"HTCOPRO1","N", 7,5},;
{"HTCOPRO2","N", 6,2},{"HTLOCOFI","N", 3,0},{"HUCOD ","C", 2,0},{"HUFEC ","D", 8,0},;
{"HTUNIDAD","C", 5,0},{"HTESCRIT","C", 5,0},{"HTNOTARI","N", 3,0},{"HTFECESC","D", 8,0},;
{"HTREGAPT","N",10,0},{"HTTELAPT","C",10,0},{"HTTELOFI","C",10,0}}
StrVieja:=LEN(StruVieja)
StrNueva:=LEN(StruNueva)
IF StrVieja#StrNueva //Verifica si hay diferencia crea una nueva temporal y la cambia..
COPY TO COPIATER
DBCREATE("TEMPOT",StruNueva)
USE TEMPOT
CMS=DIRARCEMP+"HT"+CODEMP+ANO
APPE FROM &CMS
COPY TO (HTER)
ELSE
IF StrVieja==StrNueva //Verifica si hay diferencia crea una nueva temporal y la cambia..
COPY TO COPIATER
DBCREATE("TEMPOT",StruNueva)
USE TEMPOT
CMS=DIRARCEMP+"HT"+CODEMP+ANO
APPE FROM &CMS
COPY TO (HTER)
ENDIF
ENDIF
ELSE
BLOQUEO()
CLOS DATA
RETU
ENDIF
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 39 guests