... <fieldlist> from customer" ) METHOD-2: Open both rowsets of parent and child> oStates := oCn:RowSet( "states" ) oCust := oCn:RowSet( "customer" ) Alternative syntaxes: a) oStates:AddChild( oCust, "state == ?", { "code" } ) b) oStates:AddChild( ...
... you click it changes to the new name. I am using FWH 15.05/xHarbour Update 2: OK, I found the problem. Replace this line: oBrw:bSkip:= {|nRecs| oCust:skipper(nRecs) } With this: oBrw:setoDBF( oCust ) And all is OK. My bad! James
... program is going to very difficult and tedious to debug. If you are using database objects then it is not much of an issue because you are using oCust:id, oPart:id, and oInvoice:id, so the code is very clear and you don't have to worry about aliases. You also are going to need the "standard" ...
I am trying to understand your code. Are TComp, TDesc, etc database objects? If so you don't need to create memory vars, you can just use the database object fieldname, ie oCust:name.
And please use the code tags when posting code so it retains its format.
... ) : Download ( everything included ) 1.9 MB : http://www.pflegeplus.com/fw_downloads/rick2.zip The Logo : REDEFINE IMAGE oImg1 ID 300 OF oCust FILENAME c_path + "\Images\Logo1.png" // Perform a Action or Info : oImg1:bLDblClick := {|| Msgalert( "Logo-Info","Information" ...
... is a good one. In essence, with his scatter you can refer to an array entry using syntax like : ?aVar[ LASTNAME ] to show what's in the buffer for oCust:LASTNAME. Clearly using the aforementioned syntax is much better than ?aVar[ 32 ] or even ?aVar[ _LASTNAME ] where _LASTNAME is #defined as 32. ...
... hash? Did you know that the equivalent of scatter and gather is built into database objects. And instead of refering to aVars[1], you can refer to oCust:name. This makes the code much easier to write and read. There are lots of other good reasons to use database objects. See my articles on FW OOP ...
... ways to do this with database objects. You can use the skipper to keep both databases in sync: oLbx:bSkip:= {| nRecs | oInvoice:skipper( nRecs), oCustomer:seek( oInvoice:invno) } Then you just define the fields: @ 0,0 LISTBOX oLbx FIELDS oInvoice:invno, oCust:company... Also you can build complex ...
... ) ) oCol:bFooter := { || nTotal } oCol:lTotal := .t. oCol:nEditType := EDIT_GET oCol:bOnPostEdit := {| o, u, n| If( n == 13, ( nTotal += (u - oCust:Salary), oCust:Salary := u, oCust:Save() ), nil ) } // total salary in the footer changes automatically. // no need to code or call refresh endif ...
... nArea:= select(1) CLOSE DATABASE select( nArea ) Return nil If you were using a database object you could simply do: ...VALID (oCust:end(), .t.) James
... TDatabase:goto() reloads the buffer after the dbgoto() call. When I change the line to this it works: oBrw:bBookMark := {| n | iif( n == nil,; ( oCust:cAlias )->( RecNo() ),; ( oCust:cAlias )->( DbGoto( n ), oCust:load(); ) ) } Thus the two codeblocks that must be assigned are bSkip and ...
... I find that this line solves the problem. None of the others you provided are actually needed. oBrw:bBookMark := {| n | iif( n == nil,(oCust:RecNo()),(oCust:GoTo(n)) ) } I have not used TXBrowse before and none of the other browses I have used have a bBookMark codeblock so I am not ...