TD_ERASERECORD ERROR

TD_ERASERECORD ERROR

Postby Silvio.Falconi » Wed Jun 19, 2019 5:38 pm

I'm using + field autoincremental


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  Expand view
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  Expand view
 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  Expand view


    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()
 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: TD_ERASERECORD ERROR

Postby nageswaragunupudi » Thu Jun 20, 2019 5:48 am

We will look into this.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: TD_ERASERECORD ERROR

Postby Silvio.Falconi » Thu Jun 20, 2019 7:42 am

Nages,
It does seem to handle the fieldtype @, but not +
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: TD_ERASERECORD ERROR

Postby nageswaragunupudi » Thu Jun 20, 2019 8:07 am

I tried this program and did not get any runtime error.
Please copy this program to your fwh\samples folder and run with buildh.bat
Code: Select all  Expand view
#include "fivewin.ch"

REQUEST DBFCDX

function tdatab_test()

   local oDbf

   DbCreate( "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')


   oDbf  := TDatabase():Open( nil, "EL", "DBFCDX", .t. )

   oDbf:Append()
   oDbf:Append()

   XBROWSER oDbf FASTEDIT

return nil
 


Can you prepare a small sample to reproduce the error?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], wilsongamboa and 43 guests