Rowset data and method is not working.

Rowset data and method is not working.

Postby dutch » Sun Feb 05, 2017 8:13 am

Dear Mr.Rao,

- Description : Error BASE/1004 Message not found: FWMARIAROWSET:ORDKEYCOUNT
- Description : Error BASE/1004 Message not found: FWMARIAROWSET:ABSOUTEPOSITION

What is difference between them?
- ::RecNo(), ::KeyNo(), ::OrdKeyNo() is the same
- ::RecCount(), ::KeyCount(), ::LastRec() is the same.

Thanks in advance.
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Rowset data and method is not working.

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

Re: Rowset data and method is not working.

Postby dutch » Tue Feb 07, 2017 2:08 am

Dear Mr.Rao,

Thank you for your clarify.
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 39 guests