FILLARRAY en :Rowset() ? Mr.Rao

FILLARRAY en :Rowset() ? Mr.Rao

Postby Ariel » Sun Feb 24, 2019 8:08 pm

Mr.Rao,

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

Gracias!
Ariel
 
Posts: 375
Joined: Wed Nov 29, 2006 1:51 pm
Location: Rosario - Argentina

Re: FILLARRAY en :Rowset() ? Mr.Rao

Postby Ariel » Mon Feb 25, 2019 11:28 pm

????
Ariel
 
Posts: 375
Joined: Wed Nov 29, 2006 1:51 pm
Location: Rosario - Argentina

Re: FILLARRAY en :Rowset() ? Mr.Rao

Postby nageswaragunupudi » Tue Feb 26, 2019 9: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
User avatar
nageswaragunupudi
 
Posts: 10465
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FILLARRAY en :Rowset() ? Mr.Rao

Postby Ariel » Tue Feb 26, 2019 9:58 am

Mr. Rao,

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

Saludos.
Ariel
 
Posts: 375
Joined: Wed Nov 29, 2006 1:51 pm
Location: Rosario - Argentina

Re: FILLARRAY en :Rowset() ? Mr.Rao

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10465
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FILLARRAY en :Rowset() ? Mr.Rao

Postby nageswaragunupudi » Tue Feb 26, 2019 4: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
User avatar
nageswaragunupudi
 
Posts: 10465
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FILLARRAY en :Rowset() ? Mr.Rao

Postby Ariel » Wed Feb 27, 2019 12:42 am

Gracias, revisare esta info.
Saludos.
Ariel
 
Posts: 375
Joined: Wed Nov 29, 2006 1:51 pm
Location: Rosario - Argentina


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 83 guests