Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.0
Offshore Outsourcing
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
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT DBF
*URGENT* HXTT JDBC - how to read "deleted records"
Perry
2009-11-17 19:51:28
Hi,

We are using HXTT JDBC to read from a DBF file. Everything works fine except
that it fails to read "deleted records". We have followed instruction on
http://www.hxtt.com/dbf/faq.html :

10. How to see those deleted records without pack?
You can use deletesAreVisible property to indicate whether the resultSet
include deleted records. Default:false
properties.setProperty("deletesAreVisible","true");//Includes deleted records.
Connection con = DriverManager.getConnection(url,properties);
ResultSet rs=stmt.executeQuery(sql);
Then you can use "ResultSet.rowDeleted()" to see whether a row is a deleted row.

If you set deletesAreVisible to true, you can use the sql sample code to query
data:
select deleted(),* from test
select * from test where not deleted()
select deleted(),* from test where deleted()
select * from test where deleted()
select sum(int1),max(dec1),min(double1) from test where deleted()

But it didn't work. This is urgent and we need to resolve it ASAP. Any advise/
help would be greatly appreciated.

Best regards,
Perry Lau
Re:*URGENT* HXTT JDBC - how to read
HXTT Support
2009-11-17 21:15:24
Passed test with the latest package and a very older package. You can download the latest package to recur that issue. If you haven't used PACK TABLE sql, your deleted rows can be restored.
Re:Re:*URGENT* HXTT JDBC - how to read
Perry
2009-11-17 21:32:47
I believe we have the latest package, and our SQL looks like:
select deleted('abc.dbf'), * from abc.dbf
(abc.dbf is the DBF filename as well as the table name. Is the syntax correct? If no, what's the correct syntax for deleted(), thx much.
Re:Re:Re:*URGENT* HXTT JDBC - how to read
HXTT Support
2009-11-17 22:10:38
Try

select deleted('test'), * from test

or

select * from test not deleted();

If you failed to see any deleted row, you should try
select count(*),reccount() from test where not deleted();
If count(*)=reccount(), it means there's no any deleted row in your dbf file.


Re:Re:Re:Re:*URGENT* HXTT JDBC - how to read
Perry
2009-11-17 22:39:03
that's strange, that's exactly what we do. Here is full details:
We use HXTT JDBC to read from a DBF file called "show2003.dbf", this file contains both regular & deleted records, we need to setup a query to read all records regardless deleted or not.

When we do "select * from show2003.dbf" -> this gives us all undeleted records fine.
When we do "select deleted('show2003.dbf') from show2003.dbf, this fails and teh error is Invalid nWorkArea or cTableAlias in DELETED(show2003.dbf).

Pls advise . thx.
Re:Re:Re:Re:Re:*URGENT* HXTT JDBC - how to read
HXTT Support
2009-11-17 23:42:01
>select deleted('show2003.dbf') from show2003.dbf,
Try select deleted('show2003'),* from show2003 where deleted()
or
select deleted(),* from show2003
Re:Re:Re:Re:Re:Re:*URGENT* HXTT JDBC - how to read
Perry
2009-11-18 00:04:25
I really appreciate "HXTT Support" quick response. However, unfortuantly it still doesn't work, detail as follows:

1) select * from show2003 -> Good, return all records execpted the ones that are deleted.

2) select deleted(), * from show2003 -> no syntax error, but still return all records expected the ones that are deleted.

3) select deleted('show2003'), * from show2003 -> exact same result as 2).

and I'm sure we have setProperty("deletesAreVisible","true"). It's really scratching now. Sorry to keep asking but it would really help us a lot if we have a solution asap.

Thx/Perry

Re:Re:Re:Re:Re:Re:Re:*URGENT* HXTT JDBC - how to read
HXTT Support
2009-11-18 00:41:45
>2) select deleted(), * from show2003 -> no syntax error, but still return all
>records expected the ones that are deleted.
select * from show2003 not deleted();

If you failed to see any deleted row, you should try
select count(*),reccount() from show2003 where not deleted();
If count(*)=reccount(), it means there's no any deleted row in your dbf file.
Re:Re:Re:Re:Re:Re:Re:Re:*URGENT* HXTT JDBC - how to read
Perry
2009-11-18 01:25:09
Got it to work now.. thx muc !!

select deleted('show2003'), * from show2003


Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap