Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  HXTT Cobol v2.1
  HXTT DBF v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel v4.2
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

HXTT DBF
It it possible to know the row number?
Daniel Serodio
2006-10-26 13:40:21.0
As far as I know, rows are always added to the end of a DBF file. So, to get the most recent record, I could look for the record with the greatest row number.

Is there some way to know the row number? I'd like to "ORDER BY rownum DESC", does HXTT DBF driver provide this feature?

Thanks,
Daniel Serodio
Re:It it possible to know the row number?
HXTT Support
2006-10-26 18:01:53.0
>Is there some way to know the row number? I'd like to "ORDER BY rownum DESC", does HXTT DBF driver provide this feature?
Yeah. If your table hasn't deleted row, you can use:
select * from youtable where recno()=reccount();
or
select * from youtable where _rowid_=reccount();


>As far as I know, rows are always added to the end of a DBF file.
If you can make sure that last inserted row hasn't been deleted, you can still use:
select * from youtable where recno()=reccount();
or
select * from youtable where _rowid_=reccount();

>I'd like to "ORDER BY rownum DESC",
You can use
select ... from youtable order by _rowid_ desc;

For instance,
select ... from youtable where _rowid_>reccount()-1000 order by _rowid_ desc;
will return the last 1000 rows.

select top 10 ... from youtable order by _rowid_ desc;










Search Key   Search by Last 50 Questions




Google
 

Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Email: webmaster@hxtt.com
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap