FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour work area not in use > dbskip
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
work area not in use > dbskip
Posted: Tue Jul 15, 2008 05:43 PM

I'm converting a small to 16 bit program to 32 bit as my test case before I move on to my much larger program. The program uses tcbrowse.ch and report.ch. I get the error message: work area not in use > dbskip.

Program works fine in 16 bits. Any idea why I'm getting the error. It says its at the line where I "activate" the oDlg that contains my browse.

All dbskips within the program are indicated as follows: dbf->(dbskip())
Help.

Thank you

Harvey
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
work area not in use > dbskip
Posted: Tue Jul 15, 2008 11:10 PM

Harvey,

Please do a MsgInfo( Alias() ) before calling DbSkip() to check the selected workarea

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
work area not in use > dbskip
Posted: Wed Jul 16, 2008 03:44 AM

Antonio
I never call a dbskip().. I did the alisa() call and the alias is correct. The first call in error log is: Called from: => DBSKIP(0).
I fixed the prg so no dbskip() is called and still get the error.

This occurs when attempting to load a browse in the oDlg.

Here is the error.log
Application
===========
Path and name: F:\FWH\cashflow\CODATA.EXE (32 bits)
Size: 1,283,584 bytes
Time from start: 0 hours 0 mins 3 secs
Error occurred at: 07/15/08, 20:31:58
Error description: Error DBCMD/2001 Workarea not in use: DBSKIP

Stack Calls

Called from: => DBSKIP(0)
Called from: => TCBROWSE:PAINT(0)
Called from: => TCBROWSE:DISPLAY(0)
Called from: => TCBROWSE:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => DIALOGBOX(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: codata.prg => CODATA(160)

Thank you

Harvey
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
work area not in use > dbskip
Posted: Wed Jul 16, 2008 06:00 AM

That means when the dialog is activated the alias is not active or already closed.

Normally this happens when we close the dbf immediately after we activate the window or a nonmodal dialog. In such cases we should close the workarea inside valid clause of the window or nonmodal dialog

Regards



G. N. Rao.

Hyderabad, India
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
work area not in use > dbskip
Posted: Wed Jul 16, 2008 08:33 AM

Harvey,

Yes, please do as Nageswararao explains you:

If you use a non modal dialogbox, please check that you are not closing the workarea further on, as the execution will not stop on a non modal dialogbox.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
work area not in use > dbskip
Posted: Wed Jul 16, 2008 01:47 PM

Program is not nonmodal and there is no close in the prg.

The dialog with the browse is called from another dialog which opens fine. I set a msgInfo(alias()) on init when activating the dialog with the browse and the alias is correct.

I think it has something to do with the browse. I think Tcbrowse calls for a dbskip in the class.

All works well in 16 bit but not in 32 bit.

Help

Thank you

Harvey
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
work area not in use > dbskip
Posted: Wed Jul 16, 2008 04:10 PM

Harvey,

Could you provide a small and self contained example to reproduce the error ? thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
work area not in use > dbskip
Posted: Wed Jul 16, 2008 04:16 PM

Harvey,

Please provide the portion of the code where you create the browse.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
work area not in use > dbskip
Posted: Wed Jul 16, 2008 06:13 PM

Just sent an email with a zip file all things needed in zip file.

Thank you

Harvey
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
work area not in use > dbskip
Posted: Wed Jul 16, 2008 06:28 PM

Harvey,

Please resend it again renamed as .ZOP file, as gmail blocks .ZIP files.

Thanks!

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
work area not in use > dbskip
Posted: Wed Jul 16, 2008 08:31 PM

Send the file. Let me know what might be missing. I received a message it didn't like pkzip.exe stripped it out . Don't understand. Never sent pkzip.exe. So let me know what eles you need.

Thanks for your assistance.

Thank you

Harvey
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
work area not in use > dbskip
Posted: Wed Jul 16, 2008 09:37 PM
Harvey,

Ok, I got your files and its already working here.

The problem is that you are mixing two different kinds of FiveWin browses: TCBrowse and TXBrowse, and you should only use one: TXBrowse.

In your resources, please change in dialogbox CODATA: "TCBrowse" into "TXBrowse".

In your PRG use #include "xbrowse.ch" instead of #include "tcbrowse.ch"

Here you have a working sample built from some portions of your code. Please review how I build it and modify your code accordingly, thanks:

test.prg
#include "FiveWin.ch"
#include "xbrowse.ch"


function Main()

   local oDlg, oDbf, oBrw

   // SET RESOURCES TO "global.dll".  I am using Test.rc for this test

   USE Codata ALIAS cont1
   DATABASE oDbf

   DEFINE DIALOG oDlg RESOURCE "Codata"

   REDEFINE XBROWSE oBrw ID 101 of oDlg

   ADD COLUMN TO oBrw;
      DATA {|| if( oDbf:industry == repli('-', 30), repli(' ', 30), ;
      if( oDbf:industry == repli('=', 30), repli('_', 30), oDbf:industry)) };
      SIZE 125  LEFT HEADER "Industry" COLOR CLR_BLACK, CLR_WHITE

   ADD COLUMN TO oBrw;
      DATA {|| if( oDbf:industry == repli('-', 30), repli(' ', 30), ;
      if( oDbf:industry == repli('=', 30), repli('_', 30), oDbf:state)) };
      SIZE 80  LEFT HEADER "State" COLOR CLR_BLACK, CLR_WHITE

   oBrw:SetoDbf( oDbf )

   ACTIVATE DIALOG oDlg CENTERED

return nil


Test.rc:
CODATA DIALOG -4, 15, 624, 333
STYLE 0x4L | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Financial Summary"
FONT 8, "MS Sans Serif"
{
 CONTROL "", 101, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 12, 8, 600, 292
 PUSHBUTTON "&Done", 4002, 554, 308, 54, 18, BS_CENTER | BS_VCENTER | WS_TABSTOP
 PUSHBUTTON "Sort ", 102, 470, 308, 54, 18, BS_CENTER | BS_VCENTER | WS_TABSTOP
}
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
work area not in use > dbskip
Posted: Wed Jul 16, 2008 09:54 PM

Thanks for the very quick response. I'll be working on it tonight when your sleeping.

Thanks again. Let you know how it works.

Thank you

Harvey
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
work area not in use > dbskip
Posted: Fri Jul 18, 2008 05:19 AM

Antonio

working great.

Thank you

Harvey

Continue the discussion