TDatabase Again .. Xbrowse does not resolve data

TDatabase Again .. Xbrowse does not resolve data

Postby Rick Lipkin » Tue May 25, 2021 4:43 pm

To All

I have created a tDatabase oDbf with these fields

Code: Select all  Expand view

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 )

Image

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

Code: Select all  Expand view

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 ..

 


Image

What am I doing wrong ??

Thanks
Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: TDatabase Again .. Xbrowse does not resolve data

Postby nageswaragunupudi » Tue May 25, 2021 4:56 pm

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: TDatabase Again .. Xbrowse does not resolve data

Postby Rick Lipkin » Tue May 25, 2021 4: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
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: TDatabase Again .. Xbrowse does not resolve data

Postby nageswaragunupudi » Tue May 25, 2021 6: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
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: TDatabase Again .. Xbrowse does not resolve data

Postby Rick Lipkin » Tue May 25, 2021 7: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
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: TDatabase Again .. Xbrowse does not resolve data

Postby TimStone » 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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: TDatabase Again .. Xbrowse does not resolve data

Postby Rick Lipkin » Wed May 26, 2021 3: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
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Marc Venken, nageswaragunupudi and 67 guests