Enrico Maria Giordano aiuto

Moderator: Enrico Maria Giordano

Enrico Maria Giordano aiuto

Postby mauri.menabue » Mon Jul 23, 2012 1:22 pm

Enrico
Sapendo che tu collabori alla gestione di xharbour e vista anche la
mia scarsa conoscenza dell'inglese di chiedo di segnalare meglio
di quanto non abbia fatto io sul gruppo comp.lang.xharbur la seguente
anomalia riscontrata nelle ultime versioni (CVS) di xHarbour.

Il byte Byte 0 della testata di un file DBF indica la natura del dbf stesso

0x02 FoxBASE
0x03 FoxBASE+/Dbase III plus, no memo
0x30 Visual FoxPro
0x31 Visual FoxPro, autoincrement enabled
0x32 Visual FoxPro with field type Varchar or Varbinary
0x43 dBASE IV SQL table files, no memo
0x63 dBASE IV SQL system files, no memo
0x83 FoxBASE+/dBASE III PLUS, with memo
0x8B dBASE IV with memo
0xCB dBASE IV SQL table files, with memo
0xF5 FoxPro 2.x (or earlier) with memo
0xE5 HiPer-Six format with SMT memo file
0xFB FoxBASE

un DBF con un campo MEMO nella sua struttura creato tramite RDD "DBFCDX"
ha come byte 0 il carattere Hex F5
se provi il seguente programma di test :

Code: Select all  Expand view

 
request DBFCDX

function Main()

   local aStru := { { "CHARACTER", "C", 25, 0 }, ;
                    { "NUMERIC",   "N",  8, 0 }, ;
                    { "DOUBLE",    "N",  8, 2 }, ;
                    { "DATE",      "D",  8, 0 }, ;
                    { "MEMO",      "M", 10, 0}}

   CLS

   if file( "testhead1.dbf")
      FErase( "testhead1.dbf" )
   endif

   if file( "testhead1.fpt")
      FErase( "testhead1.fpt" )
   endif

   if file( "testhead2.dbf")
      FErase( "testhead2.dbf" )
   endif

   if file( "testhead2.fpt")
      FErase( "testhead2.fpt" )
   endif

   if .not. file( "testhead1.dbf") .and. ;
      .not. file( "testhead1.fpt")
      dbCreate( "testhead1", aStru, "DBFCDX")
      copy file "testhead1.dbf" TO "testhead2.dbf"
      copy file "testhead1.fpt" TO "testhead2.fpt"
   endif

   if file( "testhead2.dbf")
      dbUseArea( .T., "DBFCDX", "testhead2", "TESTHEAD2", .T., .F. )
      TESTHEAD2->( dbAppend() )
      TESTHEAD2->CHARACTER := "test"
      TESTHEAD2->NUMERIC := 1000
      TESTHEAD2->MEMO    := "data"
      use
   endif

   ? "END"

return nil
 


si vede (con un editor Hex) che il file testhead1.dbf ha come byte 0 il carattare hex F5
ma guardando poi il file testhead2.dbf che non e' altro che una copia del primo
su cui viene eseguita una append/replace il byte 0 diventa hex 30.

Nella build 9445 del 2012/03/19 (quella fornita da Antonio Linares)
questa anomalia non era presente.

Aprendo il file testhesd2.dbf con VFP9 sp2 viene generato questo errore:
c:\xharbour\test\testhead2.dbf is not a table
"This file is incompatible with the current version of Visual FoxPro.
Run 30UPDATE.PRG to update the file to the current version."

Ti ringrazio in anticipo
Maurizio Menabue
User avatar
mauri.menabue
 
Posts: 146
Joined: Thu Apr 17, 2008 2:38 pm

Re: Enrico Maria Giordano aiuto

Postby Enrico Maria Giordano » Mon Jul 23, 2012 5:33 pm

Ho confermato il problema nel newsgroup. Di più non posso fare, mi dispiace.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Enrico Maria Giordano aiuto

Postby mauri.menabue » Mon Jul 23, 2012 8:56 pm

Enrico

grazie !
User avatar
mauri.menabue
 
Posts: 146
Joined: Thu Apr 17, 2008 2:38 pm


Return to All products support

Who is online

Users browsing this forum: No registered users and 19 guests