still the ordkeycount error

still the ordkeycount error

Postby Silvio.Falconi » Tue Mar 14, 2023 9:33 am

I can't understand why this error comes out yet I did everything you wrote and explained to me

the error
Code: Select all  Expand view  RUN
Application
===========
   Path and name: C:\Work\Prg\proMag\ProMag.Exe (32 bits)
   Size: 4,915,200 bytes
   Compiler version: Harbour 3.2.0dev (r2008190002)
   FiveWin  version: FWH 22.03
   C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
   Windows version: 6.2, Build 9200

   Time from start: 0 hours 0 mins 45 secs
   Error occurred at: 14-03-2023, 09:37:53
   Error description: Error DBCMD/2001  Workarea not in use: ORDKEYCOUNT

Stack Calls
===========
   Called from:  => ORDKEYCOUNT( 0 )
   Called from: .\source\classes\DATABASE.PRG => TUNMISURA:HB_EXECFROMARRAY( 0 )
   Called from: .\source\classes\DATABASE.PRG => TUNMISURA:ORDKEYCOUNT( 1622 )
   Called from: source\tabelle\PUnMisura.prg => (b)UNITAMISURA( 77 )
   Called from: .\source\classes\WINDOW.PRG => TBAR:AEVALWHEN( 3020 )
   Called from: .\source\classes\WINDOW.PRG => TDIALOG:AEVALWHEN( 3030 )
   Called from: .\source\classes\CONTROL.PRG => (b)TCONTROL( 146 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:CLICK( 0 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 716 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 999 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1845 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2051 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3560 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1097 )
   Called from: source\sistema\Main.prg => TAPPLICATION:ACTIVATE( 261 )
   Called from: source\sistema\Main.prg => MAIN( 31 )



at line 77 of UNITAMISURA I have this

DEFINE BUTTON OF oBarDialog PROMPT "Modifica" RESOURCE "MOD_REC";
ACTION Edit_UnMisura(oBrw,2,oDlg,oMisura) GROUP WHEN oMisura:OrdKeyCount() > 0



I explain you how I made on the function

function UnitaMisura()

...

oMisura:=TUnMisura():New()
oMisura:setorder(1)
oMisura:Gotop()

DEFINE DIALOG oDlg.....
DEFINE BUTTONBAR oBarDialog ....

DEFINE BUTTON OF oBarDialog PROMPT "Modifica" RESOURCE "MOD_REC";
ACTION Edit_UnMisura(oBrw,2,oDlg,oMisura) GROUP WHEN oMisura:OrdKeyCount() > 0


@ 10, 165 GET oGet VAR cSeek......
@ 110,10 XBROWSE oBrw SIZE -10,-10 PIXEL......
@ 10, 550 COMBOBOX oBrw:oSortCbx....

ACTIVATE DIALOG oDlg CENTER NOWAIT;
VALID Chiudi_Dbf(oMisura)
return nil


STATIC FUNCTION Chiudi_Dbf(oMisura)
oMisura:Close()
RETURN .t.


I have tried to recreate the error many times but failed

it doesn't always do it, how can I intercept it?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7066
Joined: Thu Oct 18, 2012 7:17 pm

Re: still the ordkeycount error

Postby Antonio Linares » Tue Mar 14, 2023 11:51 am

Dear Silvio,

Please check the bottom side of error.log to see which workarea is in use
regards, saludos

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

Re: still the ordkeycount error

Postby Silvio.Falconi » Tue Mar 14, 2023 4:00 pm

Antonio Linares wrote:Dear Silvio,

Please check the bottom side of error.log to see which workarea is in use


boh...there is not databases and I not understood where I close it
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7066
Joined: Thu Oct 18, 2012 7:17 pm

Re: still the ordkeycount error

Postby karinha » Tue Mar 14, 2023 9:54 pm

Code: Select all  Expand view  RUN

// \SAMPLES\RICK3.PRG

#Include "Fivewin.ch"

ANNOUNCE RDDSYS
REQUEST OrdKeyNo, OrdKeyCount, OrdCreate, OrdKeyGoto // Para ListBox
REQUEST DBFCDX, DBFFPT

STATIC lSalida := .F. // Para salir/exit
STATIC oWndChild, oWnd

FUNCTION Main()

   LOCAL oDlg, oFont, oBrw, oGet1, oGet2, oDbf
   LOCAL cName := Space( 20 )
   LOCAL cCity := Space( 20 )

   RDDSETDEFAULT("DBFCDX")

   SetGetColorFocus()

   // mi version no funciona asi.
   // oDbf := TDataBase():Open( NIL, "CUSTOMER", "DBFCDX", .T. )
   // oDbf := Tdatabase():Open( "Cust", "Customer", "DBFCDX", .T. )

   IF NetUse( "CUSTOMER", .T. ) // asi, mi version funciona de 1000.

      DATABASE oDbf

      oDbf:Load()
      oDbf:SetBuffer( .T. )

      oDbf:SetOrder( "STREET" )
      oDBf:GoTop()

   ELSE

      MsgStop( "Banco de Dados CUSTOMER Bloqueado", "Cuidado!" )

      RETURN NIL

   ENDIF

   DEFINE WINDOW oWnd MDI // invisible para el NOWAIT.

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0, - 14

   DEFINE DIALOG oDlg SIZE 700, 400 PIXEL TRUEPIXEL FONT oFont

   oDlg:lHelpIcon := .F.

   @  22, 20 SAY "FILTER: Name: " SIZE 100, 24 PIXEL OF oDlg

   @  20, 150 GET oGet1 VAR cName SIZE 150, 26 PIXEL OF oDlg ;
      ON CHANGE ( oGet1:Assign(), oDbf:ReFilter(), oDbf:GoTop(), oBrw:Refresh() )

   @  55, 20 XBROWSE oBrw SIZE - 20, - 20 PIXEL OF oDlg ;
      DATASOURCE oDbf ;
      COLUMNS "STREET", "FIRST", "LAST" ;
      CELL LINES NOBORDER FOOTERS

   WITH OBJECT oBrw
      :bClrSel := :bClrSelFocus
      :CreateFromCode()
   END

   @ .5, 57 BUTTON "Exit" size  50, 40 ;
      ACTION( lSalida := .T., oWnd:End(), oDlg:End() ) CANCEL

   @ .5, 70 BUTTON "View All" size 100, 40 ACTION _ViewAll( oBrw, oDbf )

   @ .5, 90 BUTTON "Reset Filter" size 100, 40 ACTION ; // _ResetFilter( oBrw,oDbf, @cName,oGet1 )
      ( oDbf:SetFilter( "UPPER(STREET) = ?", ;
      {|| { If( Empty( cName ), "none", Upper( AllTrim( cName ) ) ) } } ), ;
      oDbf:GoTop(), oBrw:Refresh(), oGet1:SetFocus() )

   ACTIVATE DIALOG oDlg CENTERED NOWAIT ;
      VALID( lSalida )

   ACTIVATE WINDOW oWnd ON INIT( oWnd:Hide() ) // WINDOW invisible.

   IF lSalida

      oDbf:Close()

      lSalida := .F.

   ENDIF

   RELEASE FONT oFont

RETURN NIL

STATIC FUNCTION _ViewAll( oBrw, oDbf, cName, oGet1 )

   oDbf:SetFilter( "" )
   oDbf:GoTop()

   oBrw:ReFresh()

RETURN NIL

STATIC FUNCTION _ResetFilter( oBrw, oDbf, cName, oGet1 )

   cName := Space( 50 )
   oGet1:ReFresh()

   oDbf:SetFilter( "" )

   oDbf:SetOrder( "STREET" )
   oDBf:GoTop()

   oDbf:SetFilter( "UPPER(STREET) = ?", ;
      {|| { If( Empty( cName ), "none", Upper( AllTrim( cName ) ) ) } } )

   oDbf:GoTop()
   oBrw:ReFresh()

   oGet1:SetFocus()

RETURN NIL

FUNCTION NetUse( cDbf, lShared )

   LOCAL cAlias := cFileName( cDbf )
   LOCAL bAlias := cFileName( cDbf )

   If cDbf = NIL .OR. !File( cDbf + ".DBF" )
      MsgStop( "NOME DO ARQUIVO INCORRETO" + CRLF + CRLF + ;
               "NÃO ACHEI BANCO DE DADOS." + CRLF + CRLF + ;
               cDbf + ".DBF", "ERRO FATAL!!" )
      RETURN( .F. )
   ENDIF

   IIf( lShared = NIL, lShared := .F., lShared )

   IF lShared = .T.

      USE ( cDbf ) ALIAS ( cAlias ) VIA "DBFCDX" SHARED NEW

   ELSE

      USE ( cDbf ) ALIAS ( cAlias ) VIA "DBFCDX" EXCLUSIVE NEW

   ENDIF

   IF !NetErr()
      RETURN( .T. )
   ENDIF

   // Se nÆo podemos abrir, solicita repeti‡Æo
   MsgStop( "IMPOSSIVEL ABRIR BANCO DE DADOS: " + cAlias + CRLF + ;
                     OemToAnsi( "BLOQUEADO POR OUTRO USUµRIO." ), ;
            "ERRO FATAL DE REDE! FECHAR BANCO DE DADOS." )

RETURN( .F. )

// FIN - kapiabafwh@gmail.com
 


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

Re: still the ordkeycount error

Postby Silvio.Falconi » Wed Mar 15, 2023 9:25 am

jao,
I Use Tdatabase and I want not use windows or windows child because on w10 it have the same style of win xp
I prefer use dialogs
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7066
Joined: Thu Oct 18, 2012 7:17 pm

Re: still the ordkeycount error

Postby Silvio.Falconi » Thu Mar 16, 2023 10:01 am

probably the button bar hadn't been closed and was causing an error, I'm constantly checking if that type of error still comes out in the other modules too
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7066
Joined: Thu Oct 18, 2012 7:17 pm

Re: still the ordkeycount error

Postby karinha » Thu Mar 16, 2023 12:13 pm

Silvio.Falconi wrote:probably the button bar hadn't been closed and was causing an error, I'm constantly checking if that type of error still comes out in the other modules too


????????????????????????????????????

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

Re: still the ordkeycount error

Postby Silvio.Falconi » Fri Mar 17, 2023 9:00 am

karinha wrote:
Silvio.Falconi wrote:probably the button bar hadn't been closed and was causing an error, I'm constantly checking if that type of error still comes out in the other modules too


????????????????????????????????????

Regards, saludos.



I meant in my source that it's the same as the one created by Cesar, I haven't tried your source.
Cesar source https://forums.fivetechsupport.com/viewtopic.php?f=3&t=42886&sid=ae1d63a1299d8a22b18b36fb16eb0fed&sid=ae1d63a1299d8a22b18b36fb16eb0fed#p257917
In my source I use a buttonbar and the error is in line 77 where it is indeed a button of the buttonbar.
When user closes dialog in button "X" ordkeyKount error.
If you read before answering with other arguments you might realize what problem I needed and it's not the first time you've done it
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7066
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 55 guests

cron