FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour FILLARRAY en :Rowset() ? Mr.Rao
Posts: 389
Joined: Wed Nov 29, 2006 01:51 PM
FILLARRAY en :Rowset() ? Mr.Rao
Posted: Sun Feb 24, 2019 08:08 PM

Mr.Rao,

sera posible añadir este metodo de tDolphin al :rowset nativo de fwh ?

Gracias!

Posts: 389
Joined: Wed Nov 29, 2006 01:51 PM
Re: FILLARRAY en :Rowset() ? Mr.Rao
Posted: Mon Feb 25, 2019 11:28 PM

????

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FILLARRAY en :Rowset() ? Mr.Rao
Posted: Tue Feb 26, 2019 09:41 AM

You may use the method GetRows(). This method has been there since the beginning,

aData := oRs:GetRows()

This method is further enhanced in 18.07:

method GetRows( [anRecs], [nStartPos], [aFields], [lWithRecNum] )
--> Returns array containing values of the records (default all
records) meeting the filter condition, if any, in the sorted order.
Parameter: lWithRecNum (last parameter) If .t., RecNo() is added to
each row as the column.
Call to this method does not change the record position.

oRs:GetRows( [lWithRecNum] ) --> All filtered records in sorted order.
oRs:GetRows( nRecs, [lWithRecNum] ) --> First nRecs (filtered in sorted
order)
oRs:GetRows( nRecs, nStartPos, [lWithRecNum] ) -->
nRecs starting from nStartPos
oRs:GetRows( aRecs, [lWithRecNum] ), where aRecs is an array of record
numbers. Records with the recnos contained in aRecs, whether or not
meeting filter condition in the same order of the array aRecs.
If a recno does not exist, blank record is included.
3rd Parameter: aFields ( array of field numbers / field names / expressions
containing field names ). If specified, returned array contains the
values of the fields specified

Regards



G. N. Rao.

Hyderabad, India
Posts: 389
Joined: Wed Nov 29, 2006 01:51 PM
Re: FILLARRAY en :Rowset() ? Mr.Rao
Posted: Tue Feb 26, 2019 09:58 AM

Mr. Rao,

No habia visto este metodo para aplicarlo, no lo habia entendido bien. Gracias pruebo.

Saludos.

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FILLARRAY en :Rowset() ? Mr.Rao
Posted: Tue Feb 26, 2019 10:10 AM

Please refer to the documentation here.

FiveWiki: http://wiki.fivetechsoft.com/doku.php?i ... connection

http://wiki.fivetechsoft.com/doku.php?i ... ariarowset

Here you find all the documentation postings viewtopic.php ? f = 6 & t = 33304

Please refer to whatsnew.txt for later enhancements

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FILLARRAY en :Rowset() ? Mr.Rao
Posted: Tue Feb 26, 2019 04:14 PM

Simple usage:

aData := oRs:GetRows()

Returns the values of all fiends for all rows starting from top till end, in the current sort order and with current filter.

oRs:GetRows( 50 ) // returns 50 records from the current position.
oRs:GetRows( 50, 25 ) // returns 50 records starting from the 25th record
oRs:GetRows( { 10, 20, 30, 40 } ) // returns values in the record numbers 10,20,30,40.

In all cases, 3rd optional parameter is aColumns ( field names or numbers )

Regards



G. N. Rao.

Hyderabad, India
Posts: 389
Joined: Wed Nov 29, 2006 01:51 PM
Re: FILLARRAY en :Rowset() ? Mr.Rao
Posted: Wed Feb 27, 2019 12:42 AM

Gracias, revisare esta info.
Saludos.

Continue the discussion