Search found 50 matches: ocust

Return to advanced search

Re: :Setfilter from a defined substring ?

... for a date-range field Hiredate from customer.dbf defined date-vars dDate1 and dDate2 to filter a date-range that means for a empty dDate2 1) oCust:Hiredate >= dDate1 and with defined dDate1 and !empty dDate2 2) oCust:Hiredate >= dDate1 .and. oCust:Hiredate <= dDate2 I tested different ...
by ukoenig
Wed Feb 13, 2019 8:06 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: :Setfilter from a defined substring ?
Replies: 6
Views: 1062

Re: :Setfilter from a defined substring ?

Works perfect :D
thank You very much

sometimes I'm thinking to complicated :oops:

After getting cLast, you can build the filter like this:
oCust:SetFilter( "UPPER(LAST) = '" + Trim( cLast ) + "'" )


regards
Uwe :D
by ukoenig
Tue Feb 12, 2019 6:04 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: :Setfilter from a defined substring ?
Replies: 6
Views: 1062

Re: :Setfilter from a defined substring ?

oCust:SetFilter( " SUBSTR( UPPER( Last ), 1, 2 ) == 'AC' " ) // is OK and is filtering -> Acker This can be written as: oCust:SetFilter( "UPPER(LAST) = 'AC'" ) // single "=". Not "==" ...
by nageswaragunupudi
Tue Feb 12, 2019 5:52 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: :Setfilter from a defined substring ?
Replies: 6
Views: 1062

:Setfilter from a defined substring ?

Hello, I must use oCust:setfilter from a substring That works perfect :D oCust:ORDSCOPE(0, cLast ) oCust:ORDSCOPE(1, cLast ) but I want to show the solution using oCust:SetFilter( ... ) :!: // the index oCust:CreateIndex( "CUSTOMER", ...
by ukoenig
Tue Feb 12, 2019 5:25 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: :Setfilter from a defined substring ?
Replies: 6
Views: 1062

Re: A toolbox of netfunctions and tDatabase-tests

Hello, I need some help for the new FILTER-section to complete it. It belongs to the first 3 positions using < Setfilter > 1. oCust:SetFilter(" Last :?: 3. oCust:SetFilter( " Hiredate :?: 2. oCust:SetFilter( " Age works :!: IF nAge2 = 0 // only nAge1   oCust:SetFilter( ...
by ukoenig
Fri Feb 08, 2019 9:02 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: A toolbox of netfunctions and tDatabase-tests
Replies: 30
Views: 6495

Re: To Nages: tdatarow add new

... < filter > i'm normally using ORDSCOPE in my old programs ( much faster ) and never noticed a problem. using with tDatabase something like : oCust:ORDSCOPE(0, Empty(oCust:LAST) ) // set top scope oCust:ORDSCOPE(1, Empty(oCust:LAST) ) // set bottom to NIL or using oCust:MARRIED = .T. oCust:Age ...
by ukoenig
Wed Feb 06, 2019 6:23 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: To Nages: tdatarow add new
Replies: 3
Views: 820

Re: DBeval for unique values

... http://www.pflegeplus.com/IMAGES/Network16.jpg This doesn't exist Is there a replacement for it :?: Case-2 and 3 : oCust: OrdSkipUnique()  // You have a normal index on LAST ( not unique )oCust:OrdSetFocus( "CUST1" )oCust:GoTop()do while ...
by ukoenig
Fri Feb 01, 2019 12:36 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: DBeval for unique values
Replies: 5
Views: 1056

Re: Show an Image on xbrowse

... ) // from Disk with path \bitmaps oCol:addbmpfile( c_path1 + "Checkoff.bmp" ) // from Disk with path \bitmaps oCol:bBmpData := {|| IIF( oCust:MARRIED = .T., 1, 2 ) } oCol:bAlphaLevel := { || IF( oCust:DELETED(), 60, 255 ) } // alphalevel for bitmaps if deleted oCol:bStrData := { || NIL ...
by ukoenig
Wed Jan 30, 2019 5:03 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Show an Image on xbrowse Resolved!!
Replies: 4
Views: 1207

Re: A toolbox of netfunctions and tDatabase-tests

Uwe wrote: cAlias := cGetNewAlias( "CUST" ) USE CUSTOMER NEW ALIAS (cAlias) SHARED VIA "DBFCDX" oCust := TDataBase():New( Select( cAlias ) ) The above should be this simple: oCustomers:= TCustomers():New() You need to create a class for each file and the class ...
by James Bott
Fri Jan 25, 2019 6:50 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: A toolbox of netfunctions and tDatabase-tests
Replies: 30
Views: 6495

Re: A toolbox of netfunctions

Uwe, Also you must have oCust declared as a static because you didn't pass it. I don't recommend using statics. And I don't recommend calling functions to manipulate the database. If you want to modify the database's behavior then create ...
by James Bott
Thu Jan 24, 2019 4:50 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: A toolbox of netfunctions and tDatabase-tests
Replies: 30
Views: 6495

Re: Database - 17.07 - Problems

James,

I'm sorry but at the line
>> oStates:GoTop() // oStates is now using the workarea of oCust. No error.

I get an error DBCMD/2001 Workarea non in use: DBGOTOP

I'm using TDatabase 17.04 with old Close Method
by Diego Decandia
Wed Sep 06, 2017 6:40 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Database - 17.07 - Problems
Replies: 84
Views: 12533

Re: Database - 17.07 - Problems

Diego, Try this simple test. Compile it with ver 17.06 or before. You will see that oStates is showing a field from oCust. And there are no errors. Then uncomment this line: oStates:=nil And now there will be an error. This is why we need to destroy the object. James /*Purpose  : ...
by James Bott
Wed Sep 06, 2017 6:07 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Database - 17.07 - Problems
Replies: 84
Views: 12533

Re: Database - 17.07 - Problems

... in my code above, you don't have to get an error for things to be going wrong. Did you look at the code? Notice that oSales is showing data from oCust under those circumstances--and there are no errors. Just using the new Close method from 17.07 isn't going to solve these kinds of problems. You ...
by James Bott
Wed Sep 06, 2017 5:36 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Database - 17.07 - Problems
Replies: 84
Views: 12533

Re: TDatabase with several DBF

... if you wish. For example, you may have one open for an editor of clients, but open a second one to do a quick lookup of a different account: oCust := TDataBase():Open( nil, "customer.dbf", "DBFCDX" ) oCust2 := TDataBase():Open( nil, "customer.dbf", "DBFCDX" ...
by TimStone
Sat Jul 29, 2017 9:29 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: TDatabase with several DBF
Replies: 6
Views: 1856

Re: TDatabase with several DBF

You can use any number of DBFs with different objects.
You can also open same DBF with different objects.

Eg:
oCust := TDataBase():Open( nil, "customer.dbf", "DBFCDX" )
oStates := TDataBase():Open( nil, "states.dbf", "DBFCDX" )

? oCust:first
? oStates:name
by nageswaragunupudi
Sat Jul 29, 2017 12:53 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: TDatabase with several DBF
Replies: 6
Views: 1856
PreviousNext

Return to advanced search