work area not in use > dbskip

Post Reply
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

work area not in use > dbskip

Post by hag »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Harvey,

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

Antonio Linares
www.fivetechsoft.com
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

Post by hag »

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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

Post by hag »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Harvey,

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

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

Post by Antonio Linares »

Harvey,

Please provide the portion of the code where you create the browse.
regards, saludos

Antonio Linares
www.fivetechsoft.com
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

Post by hag »

Just sent an email with a zip file all things needed in zip file.
Thank you
Harvey
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Harvey,

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

Thanks!
regards, saludos

Antonio Linares
www.fivetechsoft.com
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

Post by hag »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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

Code: Select all

#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:

Code: Select all

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
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

Post by hag »

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
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

Post by hag »

Antonio

working great.
Thank you
Harvey
Post Reply