USRRDD + FWH

Post Reply
Marcelo Via Giglio
Posts: 1033
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

USRRDD + FWH

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Marcelo Via Giglio
Posts: 1033
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Marcelo,

It is FWH errorsys. It has to be modified.

We are going to review it asap.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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!
regards, saludos

Antonio Linares
www.fivetechsoft.com
Marcelo Via Giglio
Posts: 1033
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Post by Marcelo Via Giglio »

Antonio,

thanks, now I have the correct error message

regards

Marcelo
Post Reply