| Wah Wah 69,
More than likely it is an index issue. But it may be more than that. Make sure that you have recreated all of the various indexes for that app. If it isn't the indexes then there must be something that happens when you add a record that didn't get updated when you manually added the records yourself. One way to debug it is to look at all of the dates & times on the dbf's and indexes prior to adding a record and then look at them after to see what the program updated. There may be a DBF that needs a link to complete the addition of a record for the invoice to function properly. In the same vain, compare the record you appended in yourself and the record you added thru the system, it may be missing a piece data element to complete the link.
I don't see how an ODBC driver would make any differences to your problem because you work around your app and not with it. Is there an import function to setup records? And yes dbase is obsolete animal but still functional for what it is used for in most cases
Jim C.
”Thanks for your reply!
Taking a deeper look at the dos app files I found the file "Alta.prg" which seems to be the exact piece of code that handles customers adition to the database.
Also in the same folder are located "Alta.bdo and Cliente.com" The bdo file seems to be the compiled .prg.
Note this lines:
SET INDEX TO C:\DISLAPE_\DATOS\CLI_COD **Customer code
USE C:\DISLAPE_\DATOS\CLIENTE -> This is a com file!
***
SET INDEX TO C:\DISLAPE_\DATOS\\CLI_NOM **Customer name
REINDEX
SET INDEX TO C:\DISLAPE_\DATOS\CLI_APE1 ** Customer Surname
REINDEX
SET INDEX TO C:\DISLAPE_\DATOS\CLI_APE2 ** Customer Surname
REINDEX
SET INDEX TO C:\DISLAPE_\DATOS\CLI_LOC ** Customer Location
REINDEX
This is Alta.prg code:
**** ALTA CLIENTES ****
SET TALK OFF
SET ECHO OFF
USE C:\DISLAPE_\DATOS\CLIENTE
SET INDEX TO C:\DISLAPE_\DATOS\CLI_COD
CLEAR
SW="N"
COD=SPACE(6)
SET MESSAGE TO [ (ESC-en codigo)SALIR ()CAMPO ARRIBA ()CAMPO ABAJO (<Ł)ACEPTAR CAMPO]
DO WHILE COD <> "0"
CLEAR
RUN C:\DISLAPE_\CLIENTES\PAN_CLI
@ 22,20 SAY " P R O G R A M A D E A L T A S "
COD=SPACE(6)
NOM=SPACE(15)
APE1=SPACE(15)
APE2=SPACE(15)
DI=SPACE(40)
LOC=SPACE(20)
PRO=SPACE(20)
CIFV=SPACE(10)
TEL=SPACE(9)
MOVI=SPACE(9)
EN=SPACE(4)
SU=SPACE(4)
D_C=SPACE(2)
N_CUENTA=SPACE(10)
N_BANCO=SPACE(30)
@ 5,61 GET COD
READ
IF LASTKEY()=27
COD="0"
ENDIF
IF COD<>"0"
SEEK COD
IF EOF()
@ 5,28 GET CIFV
@ 8,10 GET APE1
@ 8,26 GET APE2
@ 8,42 GET NOM
@ 10,17 GET DI
@ 12,17 GET LOC
@ 12,49 GET PRO
@ 14,16 GET TEL PICTURE "999999999"
@ 15,16 GET MOVI PICTURE "999999999"
@ 14,41 GET N_BANCO
@ 16,15 GET EN PICTURE "9999"
@ 16,29 GET SU PICTURE "9999"
@ 16,39 GET D_C PICTURE "99"
@ 16,48 GET N_CUENTA PICTURE "9999999999"
READ
APPEND BLANK
SW="S"
REPLACE CODIGO WITH COD
REPLACE NOMBRE WITH NOM
REPLACE APELLIDO1 WITH APE1
REPLACE APELLIDO2 WITH APE2
REPLACE DNI WITH CIFV
REPLACE DIRECCION WITH DI
REPLACE LOCALIDAD WITH LOC
REPLACE PROVINCIA WITH PRO
REPLACE TELEFONO WITH VAL(TEL)
REPLACE MOVIL WITH VAL(MOVI)
REPLACE ENTIDAD WITH EN
REPLACE SUCURSAL WITH SU
REPLACE DC WITH D_C
REPLACE CCC WITH N_CUENTA
REPLACE NOMBRE_BAN WITH N_BANCO
ELSE
SET COLOR TO W/N
@ 5,28 SAY DNI
@ 8,10 SAY APELLIDO1
@ 8,26 SAY APELLIDO2
@ 8,42 SAY NOMBRE
@ 10,17 SAY DIRECCION
@ 12,17 SAY LOCALIDAD
@ 12,49 SAY PROVINCIA
@ 14,16 SAY STR(TELEFONO,9)
@ 14,41 SAY NOMBRE_BAN
@ 16,15 SAY ENTIDAD
@ 16,29 SAY SUCURSAL
@ 16,39 SAY DC
@ 16,48 SAY CCC
SET COLOR TO W/B
TECLA=SPACE(1)
@ 20,13 SAY "CLIENTE YA MECANIZADO. PULSE UNA TECLA PARA CONTINUAR " GET TECLA
READ
@ 20,13 SAY " "
ENDIF
ENDIF
ENDDO
SET MESSAGE TO [ ]
IF SW="S"
SET INDEX TO C:\DISLAPE_\DATOS\\CLI_NOM
REINDEX
SET INDEX TO C:\DISLAPE_\DATOS\CLI_APE1
REINDEX
SET INDEX TO C:\DISLAPE_\DATOS\CLI_APE2
REINDEX
SET INDEX TO C:\DISLAPE_\DATOS\CLI_LOC
REINDEX
ENDIF
CLOSE DATABASE
RETURN
Can I make dbase generate the from my hand edited dbf file, how?
Can I externally generate the ndx files, how? |