xBrowse: how to retrieve field names...

Re: xBrowse: how to retrieve field names...

Postby nageswaragunupudi » Wed Oct 02, 2013 8: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: Select all  Expand view
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: Select all  Expand view
  @ 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
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse: how to retrieve field names...

Postby bosibila » Wed Oct 02, 2013 9:57 am

Thanks Rao,

Best regards
Boris (FWH 20.07, xHarbour 1.2.3, Harbour 3.2.0, BCC74, MySql 5.7)
User avatar
bosibila
 
Posts: 53
Joined: Wed Aug 06, 2008 5:27 pm
Location: Osijek, Croatia

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 95 guests