FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TDatabase Again .. Xbrowse does not resolve data
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
TDatabase Again .. Xbrowse does not resolve data
Posted: Tue May 25, 2021 04:43 PM
To All

I have created a tDatabase oDbf with these fields

Code (fw): Select all Collapse
DBF_STRU := { }
AADD( DBF_STRU, { "CustID",      "C", 15, 0 } )
AADD( DBF_STRU, { "SceisId",     "C", 21, 0 } )
AADD( DBF_STRU, { "CustName",    "C", 50, 0 } )
AADD( DBF_STRU, { "CustAdd1",    "C", 50, 0 } )
AADD( DBF_STRU, { "CustCity",    "C", 35, 0 } )
AADD( DBF_STRU, { "CustState",   "C",  2, 0 } )
AADD( DBF_STRU, { "CustZip",     "C", 30, 0 } )
AADD( DBF_STRU, { "CustPh",      "C", 15, 0 } )
AADD( DBF_STRU, { "CustCont",    "C", 36, 0 } )
AADD( DBF_STRU, { "CustMail",    "C", 50, 0 } )


And it works

xBrowse( oDbf )



For whatever reason when I create an xBrowse from resource and code .. all I get is a blank browse

Code (fw): Select all Collapse
REDEFINE xBROWSE oLBX             ;
         DATASOURCE oDbf             ;
         COLUMNS "CUSTID",           ;
                 "SCEISID",          ;
                 "CUSTNAME",         ;
                 "CUSTPH",           ;
                 "CUSTCONT"          ;
         COLSIZES 65,65,150,85,150   ;
         HEADERS "Cust Id",          ;
                 "Sceis Id",         ;
                 "Customer Name",    ;
                 "Phone",            ;
                 "Contact Person"    ;
         ID 172 of oGrps             ;
         AUTOCOLS LINES CELL

        oLbx:nMarqueeStyle := MARQSTYLE_HIGHLROW
       oLbx:lRecordSelector := .f.
       oLbx:lHScroll := .f. // turn off horiz scroll bar

       xbrowse( oDbf )   // blank fields and oLbx never resolves ..




What am I doing wrong ??

Thanks
Rick Lipkin
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TDatabase Again .. Xbrowse does not resolve data
Posted: Tue May 25, 2021 04:56 PM

After redefining xbrowse, activate the dialog. Do not call xbrowse(odbf) function.

Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: TDatabase Again .. Xbrowse does not resolve data
Posted: Tue May 25, 2021 04:59 PM

Rao

Please check your e-mail .. I sent you my code ... I have taken out the filter here but I can not get oLbx to resolve ..

Thanks
Rick Lipkin

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TDatabase Again .. Xbrowse does not resolve data
Posted: Tue May 25, 2021 06:21 PM
Rick Lipkin wrote:Rao

Please check your e-mail .. I sent you my code ... I have taken out the filter here but I can not get oLbx to resolve ..

Thanks
Rick Lipkin

I will see.
Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: TDatabase Again .. Xbrowse does not resolve data
Posted: Tue May 25, 2021 07:29 PM

Rao

Just sent you a small self contained example via HighTail.com ...

1) Start main
2) Click on Clint Info
3) you will see a couple of oDBf xbrowses verifying the database
4 Click on view all .. this should paint oLbx or the top xBrowse ..

Instead I get an ( included ) error ...

Application

Path and name: C:\Fox\DOI\Example\MAIN.Exe (32 bits)
Size: 4,087,296 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20201015)
FiveWin version: FWH 20.06
C compiler version: Borland/Embarcadero C++ 7.4 (32-bit)
Windows version: 6.2, Build 9200

Time from start: 0 hours 0 mins 10 secs
Error occurred at: 05/25/2021, 15:28:47
Error description: Error DBCMD/2001 Workarea not in use: DBCLEARFILTER

Stack Calls

Called from: => DBCLEARFILTER( 0 )
Called from: .\source\classes\DATABASE.PRG => TDATABASE:SETFILTER( 1539 )
Called from: CUSTVIEW.PRG => _VIEWALL( 648 )
Called from: CUSTVIEW.PRG => (b)_CUSTVIEW( 281 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 713 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 999 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1817 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2051 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1097 )
Called from: MAIN.PRG => MAIN( 252 )

The program was compiled with xMate .

Use the .res file and add to your link list ( no need to add the individual .rc files )

Let me know what you find and if I am just doing something wrong ..

Thanks
Rick Lipkin

Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: TDatabase Again .. Xbrowse does not resolve data
Posted: Tue May 25, 2021 10:37 PM

RIck,

Since I don't see your full code, it's hard to troubleshoot the problem. It would appear that oDbf was not opened before the browse.

If you want to send me the code, I'll look at it. I use browses with data objects extensively, and they are all from resource, but I don't use Borland.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: TDatabase Again .. Xbrowse does not resolve data
Posted: Wed May 26, 2021 03:02 PM

Tim

Thank you for your kind offer ... Let me see what Rao has to say and his suggestions to make my dilemma work ..

Regards
Rick Lipkin

Continue the discussion