Creation Array from Tdatabase

Creation Array from Tdatabase

Postby Silvio.Falconi » Fri Oct 11, 2024 11:58 am

I need to create on Memory an array from a database

I need to insert several conditions

Now I tried making a filter

oConteggio:=TDatabase():Open( , "Lotto", "DBFCDX", .T. )

IF nLastRecords > 0
nInit:=oConteggio:lastrec()-nLastRecords
nEnd:= oConteggio:lastrec()
ENDIF

oConteggio:Exec( <||
SET FILTER TO ( dFirst <= FIELD->DATA .AND. ;
dLast >= FIELD->DATA .AND. ;
aCountMesi[ MONTH( FIELD->DATA ) ] .AND. ;
aCountGiorni[ DOW( FIELD->DATA )-1 ] .AND. ;
aCountDate[ DAY( FIELD->DATA ) ] .AND. ;
aCountIndici[ FIELD->IDX ] )
return nil
> )

where I insert the conditions on FW_Dbftoarray function ?

thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: Creation Array from Tdatabase

Postby nageswaragunupudi » Fri Oct 11, 2024 1:08 pm

Code: Select all  Expand view  RUN
function FW_DbfToArray( cFieldList, bFor )

Give your filter condition in the second parameter ( bFor ) as a codeblock
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Creation Array from Tdatabase

Postby Silvio.Falconi » Fri Oct 11, 2024 5:31 pm

nageswaragunupudi wrote:
Code: Select all  Expand view  RUN
function FW_DbfToArray( cFieldList, bFor )

Give your filter condition in the second parameter ( bFor ) as a codeblock


Thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 42 guests