FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour USRRDD + FWH
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM

USRRDD + FWH

Posted: Mon Sep 11, 2006 12:55 PM
Hello,

I'm trying to work with last CVS version of xHarbour, I have interest in the USRRDD, the next example compile, but when I try to modify or delete some record the program crash, some body ( Enrico? ) have idea why? is a xHarbour or FW issue

#INCLUDE "fivewin.ch"

REQUEST ARRAYRDD

FUNCTION main()
   LOCAL aStruct

   SET CENTURY ON
   SET DELETED OFF

   aStruct := { ;
                { "NAME"     , "C", 40, 0 } ,;
                { "ADDRESS"  , "C", 40, 0 } ,;
                { "BIRTHDAY" , "D",  8, 0 } ,;
                { "AGE"      , "N",  3, 0 }  ;
              }

   dbCreate( "arrtest.dbf", aStruct, "ARRAYRDD" )

   USE arrtest.dbf VIA "ARRAYRDD"

   dbAppend()
   field->name     := "Giudice Francesco Saverio"
   field->address  := "Main Street 10"
   field->birthday := CToD( "03/01/1967" )
   field->age      := 39


   dbAppend()
   field->name     := "Mouse Mickey"
   field->address  := "Main Street 20"
   field->birthday := CToD( "01/01/1940" )
   field->age      := 66

   arrtest -> ( DBGOTOP() )

   BROWSE()

  
RETURN  NIL


some help?

Regards

Marcelo
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: USRRDD + FWH

Posted: Mon Sep 11, 2006 04:30 PM

It seems a FWH issue as it works just fine in pure xHarbour.

EMG

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

USRRDD + FWH

Posted: Mon Sep 11, 2006 06:25 PM

Marcelo, Enrico,

It looks as PACK, RLock() and UNLOCK are crashing with that RDD.

Could you please confirm it, testing the sample without FWH and using those sentences ? thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

USRRDD + FWH

Posted: Mon Sep 11, 2006 06:35 PM

Those sentences generate an error, but FWH errorsys tries to use the RDD again, thats why it crashes. We need to modify FWH errorsys.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM

USRRDD + FWH

Posted: Mon Sep 11, 2006 07:02 PM

Thanks Enrico, Antonio

yes, I compiled the same source code without the first line (#include "fivewin.ch") and surprise, I have the same behavior, all ok until we try to modife or insert a record.

Maybe I'm doing some thing wrong, link script? I only add usrrdd.lib to bld.bat.

If you have some idea please share it with me

regards

Marcelo

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

USRRDD + FWH

Posted: Mon Sep 11, 2006 08:39 PM

Marcelo,

It is FWH errorsys. It has to be modified.

We are going to review it asap.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

USRRDD + FWH

Posted: Mon Sep 11, 2006 09:56 PM
Antonio Linares wrote:Marcelo, Enrico,

It looks as PACK, RLock() and UNLOCK are crashing with that RDD.

Could you please confirm it, testing the sample without FWH and using those sentences ? thanks


Confirmed. They crash with error "Operation not supported".

EMG
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

USRRDD + FWH

Posted: Tue Sep 12, 2006 05:29 AM

Marcelo,

Please modify source\function\errsysw.prg line 213:
if ! Empty( Alias( n ) ) .and. ( Alias( n ) )->( RddName() ) != "ARRAYRDD"

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

USRRDD + FWH

Posted: Tue Sep 12, 2006 05:50 AM
This is a better fix (in source\function\errsysw.prg):
         if ( Alias( n ) )->( RddName() ) != "ARRAYRDD"  // NEW!           
            cErrorLog += "     Indexes in use " + Space( 23 ) + "TagName" + CRLF
            for j = 1 to 15
               if ! Empty( ( Alias( n ) )->( IndexKey( j ) ) )
                  cErrorLog += Space( 8 ) + ;
                               If( ( Alias( n ) )->( IndexOrd() ) == j, "=> ", "   " ) + ;
                               PadR( ( Alias( n ) )->( IndexKey( j ) ), 35 ) + ;
                               ( Alias( n ) )->( OrdName( j ) ) + ;
                               CRLF
               endif
            next
            cErrorLog += CRLF + "     Relations in use" + CRLF
            for j = 1 to 8
               if ! Empty( ( nTarget := ( Alias( n ) )->( DbRSelect( j ) ) ) )
                  cErrorLog += Space( 8 ) + Str( j ) + ": " + ;
                               "TO " + ( Alias( n ) )->( DbRelation( j ) ) + ;
                               " INTO " + Alias( nTarget ) + CRLF
                  // uValue = ( Alias( n ) )->( DbRelation( j ) )
                  // cErrorLog += cValToChar( &( uValue ) ) + CRLF
               endif
            next
         endif   // NEW!
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM

USRRDD + FWH

Posted: Tue Sep 12, 2006 01:29 PM

Antonio,

thanks, now I have the correct error message

regards

Marcelo

Continue the discussion