I'm using tdata/tdatabase
it appears the the TD_EraseRecord() method is unable to handle the fieldtype +
when I save a record I have this error
Code: Select all
Application
===========
Path and name: C:\Work\Prg\Tdata\Bikini\main.Exe (32 bits)
Size: 7,006,720 bytes
Compiler version: Harbour 3.2.0dev (r1904111533)
FiveWin version: FWH 19.05
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 2 mins 32 secs
Error occurred at: 19-06-2019, 17:28:24
Error description: Error DBFCDX/1020 Errore nel tipo dei dati: ELNUMERO
Args:
[ 1] = N 0
Stack Calls
===========
Called from: => FIELDPUT( 0 )
Called from: .\source\classes\DATABASE.PRG => TELEMENTI:TD_ERASERECORD( 2114 )
Called from: .\source\classes\DATABASE.PRG => TELEMENTI:TD_APPENDBLANK( 2171 )
Called from: .\source\classes\DATABASE.PRG => TDATABASE:APPEND( 1514 )
Called from: Lib\tdata\TData.prg => TELEMENTI:RECAPPEND( 427 )
Called from: Lib\tdata\TData.prg => (b)TDATA_APPEND( 235 )
Called from: Lib\tdata\TData.prg => TELEMENTI:NETLOCK( 394 )
Called from: Lib\tdata\TData.prg => TELEMENTI:APPEND( 235 )
Called from: Lib\tdata\TNextID.prg => TELEMENTI:SAVE( 124 )
Called from: Lib\tdata\TRecord.prg => TELEMENTO:SAVE( 139 )
Called from: source\PElementi.prg => ELEDITA( 815 )
the structure of elementi.dbf
Code: Select all
DbCreate(cDir+'El',{ { "ELNUMERO" , "+", 2, 0 },; //NUMERO
{ "ELORDINE" , "N", 2, 0 },; //ORDINE
{ "ELNOME" , "C", 30, 0 },; //DESC
{ "ELCOLORE" , "C", 30, 0 },; //COLORE
{ "ELATTIVO" , "L", 1, 0 },; // ATTIVO
{ "ELIMGLIB" , "C", 120, 0 },; // LIBERO
{ "ELIMGOCC" , "C", 120, 0 },; // OCCUPATO
{ "ELIMGALT" , "C", 120, 0 },; //DISEGNO
{ "ELLOCK" , "L", 1, 0 }}, 'DBFCDX')
the index
Code: Select all
INDEX ON ELNUMERO TAG EL001 EVAL (oProgress:SetPos(nProgress++), Sysrefresh()) EVERY 1 FOR !Deleted()
INDEX ON ELORDINE TAG EL002 EVAL (oProgress:SetPos(nProgress++), Sysrefresh()) EVERY 1 FOR !Deleted()
INDEX ON ELNOME TAG EL003 EVAL (oProgress:SetPos(nProgress++), Sysrefresh()) EVERY 1 FOR !Deleted()