Search found 53 matches: ocustomer

Return to advanced search

Re: Does TDatabase supports SEEK LAST?

Saved me a few keystrokes :)
I normally would type as (oDbf:cAlias)->(dbSeek(cSeek, nil, .t.))


If you use database objects then you can just do:

oCustomer:goBottom()
by James Bott
Fri Nov 10, 2023 1:42 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Does TDatabase supports SEEK LAST?
Replies: 5
Views: 305

Re: using Function twice with Object as Parameter ?

Jimmy, I'm not sure I understand what you want to do but here is an example of adding a new sale amount to a oCustomer object using a function. Note that a customer object exists until you end it. Function addSale( oCustomer, nNewSale )   oCustomer:TotalSales := oCustomer:TotalSales: ...
by James Bott
Mon Feb 27, 2023 8:32 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: using Function twice with Object as Parameter ?
Replies: 2
Views: 230

Re: How write a right name of a field

... do: oDBF:ID := cID oDBF:Name := cName However you should always use a meaningful name for the database object, so it should be something like: oCustomer:ID oCustomer:Name You should not use oDBF as an object name because all that tells you is that it is a database object, but not which database ...
by Silvio.Falconi
Fri Apr 29, 2022 8:08 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How write a right name of a field
Replies: 6
Views: 479

Re: How write a right name of a field

... do: oDBF:ID := cID oDBF:Name := cName However you should always use a meaningful name for the database object, so it should be something like: oCustomer:ID oCustomer:Name You should not use oDBF as an object name because all that tells you is that it is a database object, but not which database ...
by James Bott
Thu Apr 28, 2022 6:19 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How write a right name of a field
Replies: 6
Views: 479

Re: Conversion from ca-clipper ( not found a variable)

... in OOP, and the only variable type I normally use is LOCAL. I don't use the type "FIELD" since I only use database objects (e.g. oCustomer:name), and thus no variable type declaration is needed for field names. You can also eliminate PUBLICs using a database object. I think you ...
by James Bott
Thu Mar 10, 2022 6:36 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Conversion from ca-clipper ( not found a variable)
Replies: 30
Views: 1940

Re: TDatabase Class

... OOP articles. http://gointellitech.com/program.html 1) I want to create a Database as oDbf and pass oDbf much like we do with Ado .. oRs Simple: oCustomers:= TCustomers():new() Requires that you build a TCustomers class first. You can pass the object. You can also have objects within objects. ...
by James Bott
Wed May 19, 2021 3:11 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: TDatabase Class
Replies: 18
Views: 2067

How to change the xBrowse-bkstyle at runtime ?

... 10, 10 XBROWSE oBrw1 SIZE 850, 525 PIXEL OF oFld:aDialogs[ 1 ] ; COLSIZES 40, 110, 110, 200, 150, 70, 100, 100, 100, 80, 60, 120, 160 ; DATASOURCE oCustomer AUTOCOLS LINES NOBORDER FONT oFont2 ; BACKGROUND cBackImg STRETCH UPDATE :D // OK see image doesn't work :( // TILED 0 // STRETCH 1 // FILL ...
by ukoenig
Thu Apr 15, 2021 8:43 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to change the xBrowse-bkstyle at runtime ?
Replies: 1
Views: 405

Re: xBrowser

... 10, 10 XBROWSE oBrw1 SIZE 850, 525 PIXEL OF oFld:aDialogs[ 1 ] ; COLSIZES 40, 110, 110, 200, 150, 70, 100, 100, 100, 80, 60, 120, 160 ; DATASOURCE oCustomer AUTOCOLS LINES NOBORDER ; BACKGROUND cBackImg FILL :!: the var cBackImg is new defined on folderpage 2 oBrw1:SetBackGround( cBackImg, BCK_FILL ...
by ukoenig
Wed Apr 14, 2021 6:06 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowser
Replies: 9
Views: 1061

Re: Marc : Conversion process and questions about it

Marc, I just saw this old message: The variable oCustomers should be declared as LOCAL. Note that you can still pass oCustomers to a function if you wish. Why not public? Then the oCustomers is visible everywhere and we don't have to paste them by ...
by James Bott
Mon Mar 15, 2021 6:41 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Marc : Conversion process and questions about it
Replies: 30
Views: 3173

Re: memvar

... you are trying to do, but if you use database objects you don't need to use local variables for fields--that is built into the database object. oCustomer:Name Is actually a buffer that contains a copy of the data in the NAME field. Also you never need to use workareas or aliases with database ...
by James Bott
Fri Jul 17, 2020 10:07 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: memvar
Replies: 12
Views: 1314

A problem TDatabase and xBrowse using < edit_get >

Hello, I noticed a problem saving values with xBrowse edit_get using Browser 1 oCustomer := TDatabase():Open( , c_Path + "Customer", "DBFCDX", .T. ) only field LAST is working with some extracode the same using Browser 2 USE customer NEW SHARED ...
by ukoenig
Sun Nov 17, 2019 12:56 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: A problem TDatabase and xBrowse using < edit_get >
Replies: 3
Views: 834

Re: New FWH 19.09

... compiled with FWH 19.09 don*t save the data anymore on celledit Reverse compiled with FWH 19.06 it works again. as well I tested using DATASOURCE oCustomer and OBJECT oCustomer with no difference ----------------- oCustomer := TDatabase():Open( , "CUSTOMER", "DBFCDX", .T. ) ...
by ukoenig
Sun Oct 20, 2019 4:08 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: New FWH 19.09
Replies: 36
Views: 5690

Re: ORM power in next FWH

oUsers:Invoices mimics "SET RELATION TO ..."

You select a user and invoices automatically deliver his invoices


I presume "users" is really describing customers?

You can use objects to do this too:

oCustomer:Invoices()
by James Bott
Thu Jul 25, 2019 4:19 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: ORM power in next FWH
Replies: 19
Views: 3552

Write a Block

I need to return from a function a codeBlock type {|| oCustomer:First } but I Know the oDbf ( tdatabase ) and I have an array where are the fields of this archive so I have : Function bCampo( aCampos, nFor,oDbf) return oDbf:fieldWBlock(aCampos[nFor] ...
by Silvio.Falconi
Wed Jun 26, 2019 6:52 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Write a Block
Replies: 4
Views: 847

Re: XBrowse & Edit Dialogs: Writing Portable code (Recommended)

... double codes or searching at the time of saving Function EditCustomer(....) IF ladd cCustCode := CreateCode( "CUSTOMERS" ) ELSE IF oCustomer:Lastrec()==0 RETURN NIL ENDIF oCustomer:Load() cTitle := "Modify Customer" ENDIF define dialog ... REDEFINE GET oGet[1] VAR oCustomer:custNo ...
by Silvio.Falconi
Fri Apr 05, 2019 9:12 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: XBrowse & Edit Dialogs: Writing Portable code (Recommended)
Replies: 17
Views: 3647
Next

Return to advanced search