txbrowse - Workarea not in use ??

txbrowse - Workarea not in use ??

Postby russimicro » Wed May 11, 2016 8:02 pm

Code: Select all  Expand view


Buena tarde...

Continuo solicitando ayuda para detectar este error ...
es esporádico (no lo he podido replicar, se presenta con algunos clientes que tienen mucho movimiento ), y siempre es en la misma línea  

Application
===========
   Path and name: Z:\ZERUS\zeruswin.exe (32 bits)
   Size: ********* bytes
   Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20141202)
   FiveWin  Version: FWHX 15.01
   Windows version: 6.1, Build 7600

   Time from start: 0 hours 24 mins 56 secs
   Error occurred at: 05/11/2016, 12:10:17
   Error description: Error DBCMD/2001  Workarea not in use: DBGOTO

Stack Calls
===========
   Called from:  => DBGOTO( 0 )
   Called from: source\classes\xbrowse.prg => (b)TXBROWSE:SETRDD( 4168 )
   Called from: source\classes\xbrowse.prg => (b)TXBROWSE:TXBROWSE( 445 )
   Called from:  => TXBROWSE:_BOOKMARK( 0 )
   Called from: source\classes\xbrowse.prg => TXBROWSE:PAINT( 1630 )
   Called from: source\classes\xbrowse.prg => TXBROWSE:DISPLAY( 1376 )
   Called from: Source\Classes\control.prg => TCONTROL:HANDLEEVENT( 1699 )
   Called from: source\classes\xbrowse.prg => TXBROWSE:HANDLEEVENT( 12711 )
   Called from: Source\Classes\window.prg => _FWH( 3450 )
   Called from:  => SYSREFRESH( 0 )
   Called from: Source\Classes\dialog.prg => TDIALOG:END( 526 )
   Called from: Source\Classes\outl2003.prg => TOUTLOOK2003:DESTROY( 324 )
   Called from:  => TWINDOW:HANDLEEVENT( 0 )
   Called from: Source\Classes\control.prg => TCONTROL:HANDLEEVENT( 1733 )
   Called from: Source\Classes\outl2003.prg => TOUTLOOK2003:HANDLEEVENT( 345 )
   Called from: Source\Classes\window.prg => _FWH( 3450 )
   Called from:  => WINRUN( 0 )
   Called from: Source\Classes\window.prg => TWINDOW:ACTIVATE( 1152 )
   Called from: C:\Desarro\ZerusGes\VersionActual\FUENTES\COMUNES\FW_FUNCSST3.PRG => PRINCIPAL_METRO( 5019 )

// class xbrowse ... modificada

METHOD SetRDD( lAddColumns, lAutoOrder, aFldNames, aRows ) CLASS TXBrowse

   local oCol, aStruct
   local cAlias, cAdsKeyNo, cAdsKeyCount
   local nFields, nFor, n, uData
   local bOnSkip
   local cAliPru := ""

   if Empty( ::cAlias )
      ::cAlias := Alias()
      if Empty( ::cAlias )
         return nil
      endif
   endif

   IF SELECT(::cAlias) == 0
      RETURN NIL
   ENDIF

   SELECT(::cAlias)

   if ::lCreated
      if ::nDataType == DATATYPE_RDD
         if SameDbfStruct( Self, Alias() )
            return nil
         endif
      endif
      ::cAlias := Alias()
      ::ClearBlocks()
      ::aCols  := {}
   endif

//TRY

   DEFAULT lAddColumns      := Empty( ::aCols ) .or. ! Empty( aFldNames )
   DEFAULT lAutoOrder       := ::lAutoSort
   ::lAutoSort              := lAutoOrder

   cAlias      := ::cAlias
   if ValType( aRows ) == 'A' .and. Len( aRows ) > 0

      if ValType( aRows[ 1 ] ) == 'A'
         bOnSkip        := { | oBrw | ( oBrw:cAlias )->( DbGoTo( oBrw:aArrayData[ oBrw:nArrayAt ][ 1 ] ) ) }
      else
         bOnSkip        := { | oBrw | ( oBrw:cAlias )->( DbGoTo( oBrw:aArrayData[ oBrw:nArrayAt ] ) ) }
      endif
      ::SetArray( aRows, .f., 0, .f., bOnSkip )
      ::nDataType       := nOr( DATATYPE_RDD, DATATYPE_ARRAY )
      lAutoOrder        := .f.
   else
      ::nDataType := DATATYPE_RDD
   endif

   ::lSqlRDD := ( ( ::cAlias )->( RddName() ) == "SQLRDD" )
   if ::lSqlRDD
      DEFAULT ::bKeyNo  := { |n| 0 }
   endif


   IF SELECT(::cAlias) == 0  // JRT // si se reporta en el default:  "que el area esta cerrada -  Error description: Error DBCMD/2001  Workarea not in use: DBGOTO ", porque no marca el error aquí ??
      //BREAK
      return
   ENDIF

   cAliPru := ::cAlias    // prueba para capturar error

   SELECT(::cAlias)   // si se reporta en el default:  "que el area esta cerrada", porque no marca el error aquí ??

   DEFAULT ::bGoTop    := {|| ( ::cAlias )->( DbGoTop() ) },;
           ::bGoBottom := {|| ( ::cAlias )->( DbGoBottom() ) },;
           ::bSkip     := {| n | ( ::cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) },;
           ::bBof      := {|| ( ::cAlias )->( Bof() ) },;
           ::bEof      := {|| ( ::cAlias )->( Eof() ) },;
           ::bBookMark := {| n | iif( n == nil .or. n == 0 ,;
                                     ( ::cAlias )->( RecNo() ) ,;
                                    ( ::cAlias )->( DbGoto( n ) ) )  }  // línea 4168, donde se reporta el error
 

Gracias

Johnson Russi
Colombia

 
Last edited by russimicro on Wed May 11, 2016 8:11 pm, edited 1 time in total.
russimicro
 
Posts: 229
Joined: Sun Jan 31, 2010 3:30 pm
Location: Bucaramanga - Colombia

Re: txbrowse - Workarea not in use ??

Postby karinha » Wed May 11, 2016 8:11 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7315
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: txbrowse - Workarea not in use ??

Postby karinha » Wed May 11, 2016 8:12 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7315
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: txbrowse - Workarea not in use ??

Postby russimicro » Wed May 11, 2016 8:32 pm

Karinha.. Gracias por responder..

Mi duda se centra en porque el error en esa línea si en la línea anterior usa el alias de la tabla activa y no marca error (siempre es la misma línea)

SELECT(::cAlias) // sin error

DEFAULT ::bGoTop := {|| ( ::cAlias )->( DbGoTop() ) },;
::bGoBottom := {|| ( ::cAlias )->( DbGoBottom() ) },;
::bSkip := {| n | ( ::cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) },;
::bBof := {|| ( ::cAlias )->( Bof() ) },;
::bEof := {|| ( ::cAlias )->( Eof() ) },;
::bBookMark := {| n | iif( n == nil .or. n == 0 ,;
( ::cAlias )->( RecNo() ) ,;
( ::cAlias )->( DbGoto( n ) ) ) } // error aquí ??

en la referencia que me envías ... es lo del índice ???

Gracias


Johnson Russi
russimicro
 
Posts: 229
Joined: Sun Jan 31, 2010 3:30 pm
Location: Bucaramanga - Colombia

Re: txbrowse - Workarea not in use ??

Postby hmpaquito » Thu May 12, 2016 7:34 am

Mi duda se centra en porque el error en esa línea si en la línea anterior usa el alias de la tabla activa y no marca error (siempre es la misma línea)


Eso es porque

Esta es ejecutada "al momento"
Code: Select all  Expand view
SELECT(::cAlias) // sin error    



Esta en cambio esta dentro de un codeblock que es ejecutado en un momento distinto.
Code: Select all  Expand view
::bBookMark := {| n | iif( n == nil .or. n == 0 ,;
( ::cAlias )->( RecNo() ) ,;
( ::cAlias )->( DbGoto( n ) ) ) } // error aquí ??
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: txbrowse - Workarea not in use ??

Postby Carlos Mora » Fri May 13, 2016 7:09 am

Mirando la pila de llamadas del error, es el metodo End de un dialogo el que invoca a paint, por lo que debe ser que el txbrowse esta pintándose cuando ya cerraste la dbf. Como no hay codigo no se como solucionarlo, pero busca en el cierre del dialogo donde se cierran las tablas, y trara de que no cierren las tablas hasta despues del dlg:end()
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Carlos Mora
 
Posts: 988
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: txbrowse - Workarea not in use ??

Postby russimicro » Sat May 14, 2016 1:39 pm

Code: Select all  Expand view

Esta la ventana principal del sistema, inicio del sistema y despliegue del menu textual y estilo metro, en este punto no se ha invocado ningún txbrowse, y es este el activate  window del error

FUNCTION PRINCIPAL_METRO()

LOCAL oBrush,hborland,oCursor,oCursorPen,oFont, oFon
LOCAL oTimer , oSprite  , oIco,oPopup3, oPopup2
LOCAL cTipCon := "", cImaFon, SW := 0

PRIVATE lActFun := .F.

MEMVAR oBar, Omenu
PUBLIC oImageList, oToolBar, oBa1r, oBar, Omenu

CLOSE ALL

   DEFINE ICON oIco  FILENAME "IMAGENES\zeruswin.ico"

   SetResDebug(.t.)

   DEFINE WINDOW oWnd FROM 0, 0 TO 46, 128                           ;
            TITLE HB_OEMTOANSI("Russoft. Sistema de Gesti¢n Empresarial " +"(Versi¢n : "+m->cFecVerZer+")"+ " | "+ cCiaAct +" - "+ cCiaNom )    ;
            ICON oIco                                                      ;
            MENU  MenuPrincipal(oWnd)
            //MENUINFO 3
            //MDI

            oMetPri := MakeMetroPanelPrincipal( oWnd,oBrush )

            m->oMetWin := oMetPri

   ACTIVATE WINDOW oWnd MAXIMIZED  ;
                VALID ( TerminarMetro(oBrush,oMetPri), .T. ) ;
                  ON INIT ( oMetPri:Show(), oTimer := XTimers(), XTimers_2() )  // ServerSocket(),  

   // esta la línea 5019, referenciada en el error

   CHECKRES()

RETURN ( oWnd )

//***************************************************************************************




 
russimicro
 
Posts: 229
Joined: Sun Jan 31, 2010 3:30 pm
Location: Bucaramanga - Colombia

Re: txbrowse - Workarea not in use ??

Postby karinha » Mon May 16, 2016 1:39 pm

Code: Select all  Expand view

FUNCTION PRINCIPAL_METRO()

   LOCAL oBrush,hborland,oCursor,oCursorPen,oFont, oFon
   LOCAL oTimer , oSprite  , oIco,oPopup3, oPopup2
   LOCAL cTipCon := "", cImaFon, SW := 0

   PRIVATE lActFun := .F.

   MEMVAR oBar, Omenu

   PUBLIC oImageList, oToolBar, oBa1r, oBar, Omenu

   // CLOSE ALL  // Esto no es necesario. CERRAR TODO? Porque?
   // si quieres cerrar solo un BD , use:
   // CLOSE DATABASE  // mira se esta abierto mismo.

   DEFINE ICON oIco  FILENAME "IMAGENES\zeruswin.ico"

   SetResDebug(.t.)

   DEFINE WINDOW oWnd FROM 0, 0 TO 46, 128                           ;
          TITLE HB_OEMTOANSI("Russoft. Sistema de Gesti¢n Empresarial " +"(Versi¢n : "+m->cFecVerZer+")"+ " | "+ cCiaAct +" - "+ cCiaNom )    ;
          ICON oIco                                                      ;
          MENU  MenuPrincipal(oWnd)

   oMetPri := MakeMetroPanelPrincipal( oWnd,oBrush )

   m->oMetWin := oMetPri

   ACTIVATE WINDOW oWnd MAXIMIZED  ;
            VALID ( TerminarMetro(oBrush,oMetPri), .T. ) ;
            ON INIT ( oMetPri:Show(), oTimer := XTimers(), XTimers_2() )  // ServerSocket(),

   // esta la línea 5019, referenciada en el error

   CHECKRES()

RETURN ( oWnd )
 


João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7315
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 37 guests