FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse: how to retrieve field names...
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse: how to retrieve field names...
Posted: Wed Oct 02, 2013 08:31 AM
bosibila wrote:Mr Rao,

yes it is in my version. I try example with for/loop and :cHeader returns legal string array but :cExpr return "nil"

Code (fw): Select all Collapse
for i=1 to len( oBrw:aCols )
        oCol:=oBrw:aCols[ i ]
        var1:=oCol:cExpr                      // returns"nil"
        var2:=oCol:cHeader                  // returns string array with headers...
next


I will tray to check why...

Best regards

No point wasting your time. I think the initial implementation was working only for RDDs.

So I suggest you do in your code what we do inside the library in the recent versions:

Code (fw): Select all Collapse
   @ 0,0 XBROWSE oBrw OF oWnd OBJECT oQry COLUMNS aFields HEADERS aHead LINES CELL FASTEDIT

oBrw:cExprs := aFields  // Add this line after your XBROWSE command.

You can query for the column name with oCol:cExpr

When you upgrade the current versions, you can omit the extra line of code I suggested. Even if you do not omit it does not create any problem
Regards



G. N. Rao.

Hyderabad, India
Posts: 53
Joined: Wed Aug 06, 2008 05:27 PM
Re: xBrowse: how to retrieve field names...
Posted: Wed Oct 02, 2013 09:57 AM

Thanks Rao,

Best regards

Boris (FWH 20.07, xHarbour 1.2.3, Harbour 3.2.0, BCC74, MySql 5.7)

Continue the discussion