dbskipper intermitent error

Re: dbskipper intermitent error

Postby Richard Chidiak » Wed Oct 14, 2009 2:52 pm

James

yes i did add setrdd() to my code

Still puzzled, this is the part where the error occured , in the default part .... the first 2 lines were executed not the third.

DEFAULT ::bGoTop := {|| ( ::cAlias )->( DbGoTop() ) },;
::bGoBottom := {|| ( ::cAlias )->( DbGoBottom() ) },;
::bSkip := {| n | iif( n == nil, n := 1, ), ( ::cAlias )->( DbSkipper( n ) ) },;
::bBof := {|| ( ::cAlias )->( Bof() ) },;
::bEof := {|| ( ::cAlias )->( Eof() ) },;
::bBookMark := {| n | iif( n == nil,;
( ::cAlias )->( RecNo() ),;
( ::cAlias )->( DbGoto( n );
) ) }
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: dbskipper intermitent error

Postby hag » Wed Oct 14, 2009 3:01 pm

James what does setrdd() do??
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: dbskipper intermitent error

Postby James Bott » Wed Oct 14, 2009 3:05 pm

Richard,

>Still puzzled, this is the part where the error occured , in the default part .... the first 2 lines were executed not the third.

Well, it is all actually only one line as far as the compiler is concerned, so I am wondering what makes you think it is erroring where you say it is?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: dbskipper intermitent error

Postby Richard Chidiak » Wed Oct 14, 2009 3:07 pm

The error.log shows this line
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: dbskipper intermitent error

Postby James Bott » Wed Oct 14, 2009 3:07 pm

Harvey,

SetRRD() does (amoung other things) sets the codeblocks you see in Richards last message.

Since you are using a database object you need to call setoDBF(oDBF) instead.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: dbskipper intermitent error

Postby James Bott » Wed Oct 14, 2009 3:08 pm

Richard,

>The error.log shows this line

Please post that section of the error log.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: dbskipper intermitent error

Postby Richard Chidiak » Wed Oct 14, 2009 3:15 pm

james

here it is below

Error occurred at: 12/10/2009, 14:07:09
Error description: Error DBCMD/2001 Workarea not in use: DBSKIPPER

Stack Calls
===========
Called from: => DBSKIPPER(0)
Called from: C:\PRODUCTION\CBATIPROD\xbrowse.prg => (b)TXBROWSE:SETRDD(3312)
Called from: C:\PRODUCTION\CBATIPROD\xbrowse.prg => (b)TXBROWSE:TXBROWSE(308)
Called from: => TXBROWSE:SKIP(0)
Called from: C:\PRODUCTION\CBATIPROD\xbrowse.prg => TXBROWSE:PAINT(1280)
Called from: C:\PRODUCTION\CBATIPROD\xbrowse.prg => TXBROWSE:DISPLAY(927)
Called from: .\source\classes\CONTROL.PRG => TXBROWSE:HANDLEEVENT(0)
Called from: C:\PRODUCTION\CBATIPROD\window.prg => _FWH(3342)
Called from: => WINRUN(0)
Called from: C:\PRODUCTION\CBATIPROD\window.prg => TWINDOW:ACTIVATE(957)
Called from: C:\PRODUCTION\CBATIPROD\CBATIWIN.PRG => MAIN(241)


PS : i am using a modified version of xbrowse

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: dbskipper intermitent error

Postby James Bott » Wed Oct 14, 2009 3:46 pm

Richard,

OK, that is the one you posted earlier. I am not exactly sure what that means.

It doesn't make sense that it was in the setRDD() when it crashed because that would mean that the browse was never initialized. I don't see how this could happen because the file was just opened and no other functions were called before the browse was initialized.

I think it is only saying that it crashed when the bSkip codeblock was called; presumably because the file was closed.

We really need to be able to recreate the error on demand to be able to figure out eactly where the error is happening.
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: dbskipper intermitent error

Postby James Bott » Wed Oct 14, 2009 4:29 pm

Richard,

OK, I tried something different. I tried to recreate the error by modifing TXBrowse().

First I tried splitting the default line between the bGotop and bSkip and closed the database between the lines. I got a differnt error.

Code: Select all  Expand view
  Error description: Error DBCMD/2001  Workarea not in use: RDDNAME
   Args:

Stack Calls
===========
   Called from:  => RDDNAME(0)
   Called from: Test01.prg => TXBROWSE:SETRDD(3429)
   Called from: Test01.prg => MAIN(24)


So the error is not occuring where you thought it was.

Then instead i just added these two lines at the end of the setRDD() method.

close databases
::skip()

And now I get the same error as you did. So, this means that your database is being closed sometime during the execution of your program. You can confirm this by adding a button and using the ACTION dbcloseall(). Then you should get the same erorr.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: dbskipper intermitent error

Postby nageswaragunupudi » Thu Oct 15, 2009 6:46 am

Let me point out two possibilities:

1. If he is using he should use oBrw:SetoDbf( oDbf ) and definitely not SetRDD()
2. if the browse is created in a window ( other than main window ) and the dbf or odbf is closed after ACTIVATE WINDOW statement this error occurs. Because the dbf is closed even before the browse is painted.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: dbskipper intermitent error

Postby James Bott » Thu Oct 15, 2009 10:53 am

Rao,

Richard is using setRDD() because he is not using a database object. Harvey is using a database object--or at least it appears so from his error message. Perhaps he will confirm or deny this.

Your point about MDI is helpful, but in this case Richard says the error has only been occuring occasionally and he has been unable to reproduce it on demand. I think he has a function calling another function, etc. under certain conditions, and one of these functions is closing the database.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: dbskipper intermitent error

Postby hag » Thu Oct 15, 2009 2:53 pm

Yes odbf. The error ocurrs at the msgwait() line. Makes no sense and only occasionaly happens. Here is the function where the error occurs.
Nothing makes sense. No skip jsut bails out. Not often.

Message wait at bottom of code produces the error.

Code: Select all  Expand view

static function combine(mconscomp)
   local mtemp
   local oldarea := select()
   local mType1  := 0   
   local oldfilter 
   local oldorder   
   local cOldAccount   

   cursorwait() 

   retain->(dbseek("z              Total"))
   retain->cost_price := 1

   select csource

   mtemp := "1000"  //account

   gl->(dbseek("0125")) // set flag to calculate consolidated balance sheet
   gl->a14 := 1

   cursorWait()    
   gl->(dbseek("1000")) 

   csource->(dbseek("1000"))   

   do while .not. eof()
      select gl // target

      seek mTemp

      cOldAccount := mTemp

      replace gl->start1 with gl->start1 + csource->start1
      replace gl->start2 with gl->start2 + csource->start2

      replace gl->ty1 with gl->ty1 + csource->ty1
      replace gl->cf1 with gl->cf1 + csource->cf1

      replace gl->ty2 with gl->ty2 + csource->ty2
      replace gl->cf2 with gl->cf2 + csource->cf2

      replace gl->ty3 with gl->ty3 + csource->ty3
      replace gl->cf3 with gl->cf3 + csource->cf3

      replace gl->ty4 with gl->ty4 + csource->ty4
      replace gl->cf4 with gl->cf4 + csource->cf4

      replace gl->ty5 with gl->ty5 + csource->ty5
      replace gl->cf5 with gl->cf5 + csource->cf5

      replace gl->ty6 with gl->ty6 + csource->ty6
      replace gl->cf6 with gl->cf6 + csource->cf6

      replace gl->ty7 with gl->ty7 + csource->ty7
      replace gl->cf7 with gl->cf7 + csource->cf7

      replace gl->ty8 with gl->ty8 + csource->ty8
      replace gl->cf8 with gl->cf8 + csource->cf8

      replace gl->ty9 with gl->ty9 + csource->ty9
      replace gl->cf9 with gl->cf9 + csource->cf9

      replace gl->ty10 with gl->ty10 + csource->ty10
      replace gl->cf10 with gl->cf10 + csource->cf10

      replace gl->ty11 with gl->ty11 + csource->ty11
      replace gl->cf11 with gl->cf11 + csource->cf11

      replace gl->ty12 with gl->ty12 + csource->ty12
      replace gl->cf12 with gl->cf12 + csource->cf12

      replace gl->ty13 with gl->ty13 + csource->ty13
      replace gl->cf13 with gl->cf13 + csource->cf13


      // ADD ACTUAL

      replace gl->act1  with gl->act1  + csource->act1  
      replace gl->act2  with gl->act2  + csource->act2  
      replace gl->act3  with gl->act3  + csource->act3  
      replace gl->act4  with gl->act4  + csource->act4  
      replace gl->act5  with gl->act5  + csource->act5  
      replace gl->act6  with gl->act6  + csource->act6  
      replace gl->act7  with gl->act7  + csource->act7  
      replace gl->act8  with gl->act8  + csource->act8  
      replace gl->act9  with gl->act9  + csource->act9  
      replace gl->act10 with gl->act10 + csource->act10
      replace gl->act11 with gl->act11 + csource->act11
      replace gl->act12 with gl->act12 + csource->act12


      if account = "3810"
         *combine info on sale assets
         replace gl->a1   with gl->a1   + csource->a1
         replace gl->a2   with gl->a2   + csource->a2
         replace gl->a3   with gl->a3   + csource->a3
         replace gl->a4   with gl->a4   + csource->a4
         replace gl->a5   with gl->a5   + csource->a5
         replace gl->a6   with gl->a6   + csource->a6
         replace gl->a7   with gl->a7   + csource->a7
         replace gl->a8   with gl->a8   + csource->a8
         replace gl->a9   with gl->a9   + csource->a9
         replace gl->a10  with gl->a10  + csource->a10
         replace gl->a11  with gl->a11  + csource->a11
         replace gl->a12  with gl->a12  + csource->a12
         replace gl->a13  with gl->a13  + csource->a13
         replace gl->aa8  with gl->aa8  + csource->aa8
         replace gl->aa9  with gl->aa9  + csource->aa9
         replace gl->aa10 with gl->aa10 + csource->aa10
         replace gl->aa11 with gl->aa11 + csource->aa11
      endif

      if account = "6005"
         replace gl->dif1  with gl->dif1  + csource->dif1
         replace gl->dif2  with gl->dif2  + csource->dif2
         replace gl->dif3  with gl->dif3  + csource->dif3
         replace gl->dif4  with gl->dif4  + csource->dif4
         replace gl->dif5  with gl->dif5  + csource->dif5
         replace gl->dif6  with gl->dif6  + csource->dif6
         replace gl->dif7  with gl->dif7  + csource->dif7
         replace gl->dif8  with gl->dif8  + csource->dif8
         replace gl->dif9  with gl->dif9  + csource->dif9
         replace gl->dif10 with gl->dif10 + csource->dif10
         replace gl->dif11 with gl->dif11 + csource->dif11
         replace gl->dif12 with gl->dif12 + csource->dif12
         replace gl->dif13 with gl->dif13 + csource->dif13

         replace gl->ly1  with gl->ly1  + csource->ly1
         replace gl->ly2  with gl->ly2  + csource->ly2
         replace gl->ly3  with gl->ly3  + csource->ly3
         replace gl->ly4  with gl->ly4  + csource->ly4
         replace gl->ly5  with gl->ly5  + csource->ly5
         replace gl->ly6  with gl->ly6  + csource->ly6
         replace gl->ly7  with gl->ly7  + csource->ly7
         replace gl->ly8  with gl->ly8  + csource->ly8
         replace gl->ly9  with gl->ly9  + csource->ly9
         replace gl->ly10 with gl->ly10 + csource->ly10
         replace gl->ly11 with gl->ly11 + csource->ly11
         replace gl->ly12 with gl->ly12 + csource->ly12
         replace gl->ly13 with gl->ly13 + csource->ly13

         replace gl->a14  with gl->a14  + csource->a14
         replace gl->aa1  with gl->aa1  + csource->aa1
         replace gl->aa2  with gl->aa2  + csource->aa2
         replace gl->aa3  with gl->aa3  + csource->aa3
         replace gl->aa4  with gl->aa4  + csource->aa4
         replace gl->aa5  with gl->aa5  + csource->aa5
         replace gl->aa6  with gl->aa6  + csource->aa6
         replace gl->aa7  with gl->aa7  + csource->aa7
         replace gl->aa8  with gl->aa8  + csource->aa8
         replace gl->aa9  with gl->aa9  + csource->aa9
         replace gl->aa10 with gl->aa10 + csource->aa10
         replace gl->aa11 with gl->aa11 + csource->aa11
         replace gl->aa12 with gl->aa12 + csource->aa12
         replace gl->aa13 with gl->aa13 + csource->aa13

         * replace gl->act1  with gl->act1  + csource->act1
         * replace gl->act2  with gl->act2  + csource->act2
         * replace gl->act3  with gl->act3  + csource->act3
         * replace gl->act4  with gl->act4  + csource->act4
         * replace gl->act5  with gl->act5  + csource->act5
         * replace gl->act6  with gl->act6  + csource->act6
         * replace gl->act7  with gl->act7  + csource->act7
         * replace gl->act8  with gl->act8  + csource->act8
         * replace gl->act9  with gl->act9  + csource->act9
         * replace gl->act10 with gl->act10 + csource->act10
         * replace gl->act11 with gl->act11 + csource->act11
         * replace gl->act12 with gl->act12 + csource->act12
      endif

      if account = "6108"
         replace gl->a14  with gl->a14  + csource->a14
      endif    


      if account = "7115"
         replace gl->a14  with gl->a14  + csource->a14
         replace gl->a13  with gl->a13  + csource->a13
      endif    

      if account = "8415"
         replace gl->a14  with gl->a14  + csource->a14
      endif    

      if account = "8431"
         replace gl->a14  with gl->a14  + csource->a14
      endif    

      if account = "6109"
         replace gl->a14  with gl->a14  + csource->a14
         replace gl->aa1  with gl->aa1  + csource->aa1
         replace gl->aa2  with gl->aa2  + csource->aa2
         replace gl->aa3  with gl->aa3  + csource->aa3
         replace gl->aa4  with gl->aa4  + csource->aa4
         replace gl->aa5  with gl->aa5  + csource->aa5
         replace gl->aa6  with gl->aa6  + csource->aa6
         replace gl->aa7  with gl->aa7  + csource->aa7
         replace gl->aa8  with gl->aa8  + csource->aa8
         replace gl->aa9  with gl->aa9  + csource->aa9
         replace gl->aa10 with gl->aa10 + csource->aa10
         replace gl->aa11 with gl->aa11 + csource->aa11
         replace gl->aa12 with gl->aa12 + csource->aa12
         replace gl->aa13 with gl->aa13 + csource->aa13
      endif
      if account = "7010"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif
      if account = "7020"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif
      if account = "7030"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif
      if account = "7035"
         replace gl->a14 with gl->a14 + csource->a14

         *combine info on sale assets
         replace gl->aa1  with gl->aa1  + csource->aa1
         replace gl->aa2  with gl->aa2  + csource->aa2
         replace gl->aa3  with gl->aa3  + csource->aa3
         replace gl->aa4  with gl->aa4  + csource->aa4
         replace gl->aa5  with gl->aa5  + csource->aa5
         replace gl->aa6  with gl->aa6  + csource->aa6
         replace gl->aa7  with gl->aa7  + csource->aa7
         replace gl->aa8  with gl->aa8  + csource->aa8
         replace gl->aa9  with gl->aa9  + csource->aa9
         replace gl->aa10 with gl->aa10 + csource->aa10
         replace gl->aa11 with gl->aa11 + csource->aa11
         replace gl->aa12 with gl->aa12 + csource->aa12
         replace gl->aa13 with gl->aa13 + csource->aa13

      endif
      if account = "7037"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif
      if account = "7038"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif

      if account = "7040"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif
      if account = "7050"
         replace gl->a14 with gl->a14 + csource->a14

         *combine info on sale assets
         replace gl->ly1  with gl->ly1  + csource->ly1
         replace gl->ly2  with gl->ly2  + csource->ly2
         replace gl->ly3  with gl->ly3  + csource->ly3
         replace gl->ly4  with gl->ly4  + csource->ly4
         replace gl->ly5  with gl->ly5  + csource->ly5
         replace gl->ly6  with gl->ly6  + csource->ly6
         replace gl->ly7  with gl->ly7  + csource->ly7
         replace gl->ly8  with gl->ly8  + csource->ly8
         replace gl->ly9  with gl->ly9  + csource->ly9
         replace gl->ly10 with gl->ly10 + csource->ly10
         replace gl->ly11 with gl->ly11 + csource->ly11
         replace gl->ly12 with gl->ly12 + csource->ly12
         replace gl->ly13 with gl->ly13 + csource->ly13

      endif
      if account = "7060"
         replace gl->a14 with gl->a14 + csource->a14

         *combine info on sale assets
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13

      endif
      if account = "7100"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif
      if account = "7110"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif
      if account = "7112"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif

      if account = "7120"
         replace gl->a14 with gl->a14 + csource->a14

         *combine info on sale assets
         replace gl->aa1  with gl->aa1  + csource->aa1
         replace gl->aa2  with gl->aa2  + csource->aa2
         replace gl->aa3  with gl->aa3  + csource->aa3
         replace gl->aa4  with gl->aa4  + csource->aa4
         replace gl->aa5  with gl->aa5  + csource->aa5
         replace gl->aa6  with gl->aa6  + csource->aa6
         replace gl->aa7  with gl->aa7  + csource->aa7
         replace gl->aa8  with gl->aa8  + csource->aa8
         replace gl->aa9  with gl->aa9  + csource->aa9
         replace gl->aa10 with gl->aa10 + csource->aa10
         replace gl->aa11 with gl->aa11 + csource->aa11
         replace gl->aa12 with gl->aa12 + csource->aa12
         replace gl->aa13 with gl->aa13 + csource->aa13

      endif
      if account = "7123"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif

      if account = "7130"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
         replace gl->a13 with 1 // make certain it is a corp

         // CHANGED 1/16/99 TO ALLOW COMBINATION OF NON CORPORATE ENTITY   
         replace gl->a13 with csource->a13

      endif
      if account = "7140"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif


      if account = "7150"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif
      if account = "7160"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif
      if account = "6105"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif
      if account = "7125"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif    
      if account = "3808"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif

      if account = "7999"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1  with gl->a1  + csource->a1
         replace gl->a2  with gl->a2  + csource->a2
         replace gl->a3  with gl->a3  + csource->a3
         replace gl->a4  with gl->a4  + csource->a4
         replace gl->a5  with gl->a5  + csource->a5
         replace gl->a6  with gl->a6  + csource->a6
         replace gl->a7  with gl->a7  + csource->a7
         replace gl->a8  with gl->a8  + csource->a8
         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10
         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12
         replace gl->a13 with gl->a13 + csource->a13
      endif

      if account="8000"
         replace gl->a1 with gl->a1 + csource->a1
         replace gl->a2 with gl->a2 + csource->a2

         replace gl->a3 with gl->a3 + csource->a3
         replace gl->a4 with gl->a4 + csource->a4

         replace gl->a5 with gl->a5 + csource->a5
         replace gl->a6 with gl->a6 + csource->a6

         replace gl->a7 with gl->a7 + csource->a7
         replace gl->a8 with gl->a8 + csource->a8

         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10

         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12

         replace gl->a13 with gl->a13 + csource->a13
      endif

      if account="8435"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1 with gl->a1 + csource->a1
         replace gl->a2 with gl->a2 + csource->a2

         replace gl->a3 with gl->a3 + csource->a3
         replace gl->a4 with gl->a4 + csource->a4

         replace gl->a5 with gl->a5 + csource->a5
         replace gl->a6 with gl->a6 + csource->a6

         replace gl->a7 with gl->a7 + csource->a7
         replace gl->a8 with gl->a8 + csource->a8

         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10

         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12

         replace gl->a13 with gl->a13 + csource->a13
      endif

      if account="8440"
         replace gl->a14 with gl->a14 + csource->a14
         replace gl->a1 with gl->a1 + csource->a1
         replace gl->a2 with gl->a2 + csource->a2

         replace gl->a3 with gl->a3 + csource->a3
         replace gl->a4 with gl->a4 + csource->a4

         replace gl->a5 with gl->a5 + csource->a5
         replace gl->a6 with gl->a6 + csource->a6

         replace gl->a7 with gl->a7 + csource->a7
         replace gl->a8 with gl->a8 + csource->a8

         replace gl->a9  with gl->a9  + csource->a9
         replace gl->a10 with gl->a10 + csource->a10

         replace gl->a11 with gl->a11 + csource->a11
         replace gl->a12 with gl->a12 + csource->a12

         replace gl->a13 with gl->a13 + csource->a13
      endif

      * if account == "2070" .or.   account == "3345"   .OR. account == "3452";
      *      .or. account == "3538"
      *
      *    replace gl->cf1 with 0
      *    replace gl->cf2 with 0
      *
      *    replace gl->cf3 with 0
      *    replace gl->cf4 with 0
      *
      *    replace gl->cf5 with 0
      *    replace gl->cf6 with 0
      *
      *    replace gl->cf7 with 0
      *    replace gl->cf8 with 0
      *
      *    replace gl->cf9  with 0
      *    replace gl->cf10 with 0
      *
      *    replace gl->cf11 with 0
      *    replace gl->cf12 with 0
      *
      *    replace gl->cf13 with 0
      *
      * endif

      * gl->(dbseek("2070"))
      * ? gl->cf13  
      *
      * gl->(dbseek("3345"))
      * ? gl->cf13  
      *
      *  gl->(dbseek("3452"))
      * ? gl->cf13  
      *
      * gl->(dbseek("3538"))
      * ? gl->cf13  


      select csource

      skip
      mtemp = account

   enddo

   cursorwait() 

   select gl

   seek "2010"
   replace1a()// replace ty's with 0,function in calc.prg


   seek "2019"
   replace1a()// replace ty's with 0,function in calc.prg


   seek "2020"
   replace1a()// replace ty's with 0,function in calc.prg


   seek "2021"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2022"
   replace1a()// replace ty's with 0,function in calc.prg

   //ELIMINATE 7/22/00 KEEP DEPRE OUT OF CASH FLOW                         
   * seek "2023"
   * replace1a()// replace ty's with 0,function in calc.prg

   seek "2024"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2025"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2026"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2027"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2028"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2029"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2031"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2032"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2033"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2034"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2035"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2036"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2037"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2038"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2030"
   replace1a()// replace ty's with 0,function in calc.prg

   seek "2010"

   mconsmem1   =cf1
   mconsmem2   =cf2
   mconsmem3   =cf3
   mconsmem4   =cf4
   mconsmem5   =cf5
   mconsmem6   =cf6
   mconsmem7   =cf7
   mconsmem8   =cf8
   mconsmem9   =cf9
   mconsmem10  =cf10
   mconsmem11  =cf11
   mconsmem12  =cf12
   mconsmem13  =cf13

   replace1()   // cf's to 0 function in calc.prg

   seek "2019"
   cfchange()

   cursorWait()    

   replace1()   // cf's to 0 function in calc.prg

   seek "2020"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2021"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2022"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg


   //ELIMINATE 7/22/00 KEEP DEPRE OUT OF CASH FLOW                         
   * seek "2023"
   * cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2024"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2025"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2026"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2027"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2028"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2029"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2031"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2032"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2033"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2034"
   cfchange()
   replace1()   // cf's to 0 function in calc.prg

   seek "2035"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2036"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2037"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2038"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2030"
   cfchange()

   replace1()   // cf's to 0 function in calc.prg

   seek "2040"
   cfchange()

   replace cf1  with mconsmem1
   replace cf2  with mconsmem2
   replace cf3  with mconsmem3
   replace cf4  with mconsmem4
   replace cf5  with mconsmem5
   replace cf6  with mconsmem6
   replace cf7  with mconsmem7
   replace cf8  with mconsmem8
   replace cf9  with mconsmem9
   replace cf10 with mconsmem10
   replace cf11 with mconsmem11
   replace cf12 with mconsmem12
   replace cf13 with mconsmem13
[color=#404040]
 msgwait("The consolidation has been updated with Entity No."+str(mconscomp * 100,2)+".","Notice",1.5)[/color]
       
   csource->(dbclosearea())
   cursorwait() 

   select(oldarea)

   return   nil
 
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: dbskipper intermitent error

Postby James Bott » Thu Oct 15, 2009 4:46 pm

Harvey,

First, I don't see any database objects--where is it?

Second, I do see lots of database functions being called without aliasing. This is very risky. There are a number of function calls and any one of them may be changing the workarea or closing the database.

Using a database object eliminates the aliasing problem and the database closing problem.

As a design suggestion I highly recommend against using confirmation messages (your msgWait() ). Users find these annoying. It would be better to only put up a message if there was a problem--and hopefully this is a very rare occurance. Think in terms of trying to not get in the way of the user getting their job done. Another unecessary message means another unnecessary mouse click (or a wait). Banish confirmation messages.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: dbskipper intermitent error

Postby James Bott » Thu Oct 15, 2009 4:51 pm

Harvey,

An idea just came to me. Rather than your msgwait() I would write that same info to an audit file (especially since it is an accounting app). Such an audit file also helps in troubleshooting code problems. You can also have an option in the program to turn auditing on and off.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: dbskipper intermitent error

Postby James Bott » Thu Oct 15, 2009 8:21 pm

Harvey,

I looked at your error message again and I don't think the error is occuring at the msgwait(). Like Richard's problem, your database is being closed and then the program is erroring out in the browse when it attempts to skip, probably when redisplaying the browse after the msgwait() display is removed.

I note that at the end of the code you posted you are closing a database--I don't know if it is the one in the browse.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 58 guests