USRRDD + FWH

USRRDD + FWH

Postby Marcelo Via Giglio » 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

Code: Select all  Expand view
#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
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: USRRDD + FWH

Postby Enrico Maria Giordano » Mon Sep 11, 2006 4:30 pm

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

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

Postby Antonio Linares » Mon Sep 11, 2006 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Mon Sep 11, 2006 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marcelo Via Giglio » Mon Sep 11, 2006 7: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
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Postby Antonio Linares » Mon Sep 11, 2006 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Mon Sep 11, 2006 9: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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Tue Sep 12, 2006 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Tue Sep 12, 2006 5:50 am

This is a better fix (in source\function\errsysw.prg):
Code: Select all  Expand view
         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
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marcelo Via Giglio » Tue Sep 12, 2006 1:29 pm

Antonio,

thanks, now I have the correct error message

regards

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests