by nageswaragunupudi » Mon Feb 06, 2017 12:07 am
OrdKeyCount()
We did not create this method. Instead you can use method KeyCount()
AbsolutePosition:
Correct spelling is ABSOLUTEPOISTION and not ABSOUTEPOSITION.
This access method is provided for compatibility with ADO. The result is the same as KeyNo()
LastRec():
This is the last record when the RowSet is read. This remains constant during the life of the rowset, even after deletion of some records. The behavior is similar to LastRec() of DBF.
RecCount() or
RecordCount() // compatible with ADO
Total number of records in the RowSet, reduced by records deleted, if any.
KeyCount() // similar to OrdKeyCount() of DBF
Same value as RecCount() when no filter is set.
When filter is set either by calling oRs:SetFilter( <exprn> ) or oRs:Filter := <exprn>, then KeyCount() represent records remaining after setting the filter and after removing the deleted records.
Eg:
oRs := oCn:RowSet( "customer" )
? oRs:RecCount(), oRs:KeyCount() // 500,500
oRs:SetFilter( "state = 'NY'" )
? oRs:RecCount(), oRs:KeyCount() // 500,13
RecNo() // similar to RECNO() of DBF
or
BookMark // compatible with ADO
This is the serial number of the record when the rowset was first created. This number does not change for that record, even if some records are deleted or sort order is changed by calling oRs:SetOrder( <fieldname> ) or oRs:OrdSetFocus( <fieldname> ) or oRs:Sort := <fieldname>.
KeyNo() or
OrdKeyNo() or // similar to DBF
AbsolutePosition // compatible with ADO
Appear to be same as RecNo() if no records are deleted and sort order is not changed.
When some records are deleted or Sort Order is changed then this represents the serial number of the record in the apparent sorted order ignoring the deleted records and filtered out records.
GoTo( nRecNo ) or // like DBF
BookMark := nRecNo // like ADO
Moves to record whose record number is nRecNo. If the record with nRecNo is deleted, record pointer is not moved.
KeyGoTo( nKeyNo )
OrdKeyGoTo( nKeyNo ) // like DBF
AbsolutePosition := nKeyNo // like ADO
Moves to the nKeyNo position in the apparent sorted order ignoring records filtered out and deleted.
Note: We get better clarity if we keep in mind the behavior of these functions in RDD/ADO
Regards
G. N. Rao.
Hyderabad, India