Page 1 of 1

USRRDD + FWH

Posted: Mon Sep 11, 2006 12:55 pm
by Marcelo Via Giglio
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

Code: Select all

#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

Re: USRRDD + FWH

Posted: Mon Sep 11, 2006 4:30 pm
by Enrico Maria Giordano
It seems a FWH issue as it works just fine in pure xHarbour.

EMG

Posted: Mon Sep 11, 2006 6:25 pm
by Antonio Linares
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

Posted: Mon Sep 11, 2006 6:35 pm
by Antonio Linares
Those sentences generate an error, but FWH errorsys tries to use the RDD again, thats why it crashes. We need to modify FWH errorsys.

Posted: Mon Sep 11, 2006 7:02 pm
by Marcelo Via Giglio
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

Posted: Mon Sep 11, 2006 8:39 pm
by Antonio Linares
Marcelo,

It is FWH errorsys. It has to be modified.

We are going to review it asap.

Posted: Mon Sep 11, 2006 9:56 pm
by Enrico Maria Giordano
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

Posted: Tue Sep 12, 2006 5:29 am
by Antonio Linares
Marcelo,

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

Posted: Tue Sep 12, 2006 5:50 am
by Antonio Linares
This is a better fix (in source\function\errsysw.prg):

Code: Select all

         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!

Posted: Tue Sep 12, 2006 1:29 pm
by Marcelo Via Giglio
Antonio,

thanks, now I have the correct error message

regards

Marcelo