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
Delete row and index
Adam
2006-11-17 18:10:58.0
We recently purchased the HXTT DBF 3.0 driver and have written a simple web application using it to a DBASEIII database (which is simultaneously used by a legacy app). Mostly it works well except for one problem described here:

When deleting a row from the database the associate table index (.CDX) is not being updated automcatically.. so it basically gets out of sync. If we run a reindex then its all updated fine but naturally this takes time and locks the table.

Is there something about the connection I need to add specifically for this to work? An insert statement appears to update index just fine. Code snippet here:

Connection deleteCon = DriverManager.getConnection("jdbc:dbf:/c:/data?lockType=DBASEIII", "", "");
String deleteSql="delete from bookings where card1 = ? and booking_no = ?";
PreparedStatement deleteStmt=deleteCon.prepareStatement(deleteSql);
deleteStmt.setString(1, "445323");
deleteStmt.setString(2, "123");
int deleteCount=deleteStmt.executeUpdate();
deleteStmt.close();
deleteCon.close()

There are connection properties that may relate and Ive tried a heck of a lot of combinations... eg. loadIndices=true;Default Index Suffix=CDX

Thanks.... Adam
Re:Delete row and index
HXTT Support
2006-11-17 19:04:38.0
>a DBASEIII database (which is simultaneously used by a legacy app).
Your legacy application should be not DBASEIII application since DBASEIII doesn't support CDX index. Please check it, I guess that you should use FOXPRO, VFP, or CLIPPER as lockType.

>When deleting a row from the database the associate table index (.CDX) is not
> being updated automcatically.
When use deletesAreVisible=true, your CDX won't be updated for delete sql. It's normal. Otherwise, you can zip and upload your database sample into:
ftp site: ftp.hxtt.com
ftp user: anonymous@hxtt.com
ftp password: (empty)
login mode: normal (not anonymous)
ftp port:21
upload directory: incoming
transer mode: binary (not ASCII)
After upload, you can't see that upload file, but it has been upload.

You can choose to zip and email webmaster.hxtt@gmail.com too.

>There are connection properties that may relate and Ive tried a heck of a lot
> of combinations... eg. loadIndices=true;Default Index Suffix=CDX
You needn't to set those properties since HXTT DBF will detect automatically your CDX index in default.


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