A little big problem with command SORT on DBT files

A little big problem with command SORT on DBT files

Postby MaxP » Thu Jul 12, 2007 3:41 pm

HARBOUR 7.01 2007 build.
I have a problem with command SORT on DBT files.
After execution of command SORT, the file DBT loose data.
Is it my fault or is this a real BUG ?

Ciao and thanks
Massimo


Code: Select all  Expand view
#include "Fivewin.ch"

FUNCTION MAIN()
        LOCAL   cNameD := "BEGSORT.DBF"
        LOCAL   cNameM := "BEGSORT.DBT"
        LOCAL   cNameDS := "ENDSORT.DBF"
        LOCAL   cNameMS := "ENDSORT.DBT"
        LOCAL   aStr := { { "FLDDESCR", "C", 40, 0 }, ;
                          { "FLDMEMO",  "M", 10, 0 } }

        IF FILE( cNameD )
                FERASE( cNameD )
        ENDIF
        IF FILE( cNameM )
                FERASE( cNameM )
        ENDIF

        IF FILE( cNameDS )
                FERASE( cNameDS )
        ENDIF
        IF FILE( cNameMS )
                FERASE( cNameMS )
        ENDIF


        DBCREATE( cNameD, aStr )

        USE &cNameD

        APPEND BLANK
        REPLACE FLDDESCR WITH "First record"
        REPLACE FLDMEMO  WITH "First memo record"

        APPEND BLANK
        REPLACE FLDDESCR WITH "Second record"
        REPLACE FLDMEMO  WITH "Second memo record"

        SORT ON FLDDESCR TO &cNameDS

        USE
       
        MessErr( "After sort the file memo ENDSORT is empty ?????" )
       
        USE ENDSORT
        MessErr( ALLTRIM( FIELD->FLDDESCR ) + " <" + FIELD->FLDMEMO + ">" )
        SKIP
        MessErr( ALLTRIM( FIELD->FLDDESCR ) + " <" + FIELD->FLDMEMO + ">" )
        USE
RETURN NIL

FUNCTION MessErr( Mess )
        MsgBeep()
        MsgAlert( Mess, "ATTENZIONE" )
RETURN NIL
[/code]
User avatar
MaxP
 
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm

Re: A little big problem with command SORT on DBT files

Postby Enrico Maria Giordano » Thu Jul 12, 2007 3:59 pm

I confirm the bug and I'm going to report it to the Harbour and xHarbour developers list.

Thank you!

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 19 guests