Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.259
  HXTT Cobol 5.0.258
  HXTT DBF 7.1.260
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel 6.1.262
  HXTT Json 1.0.230
  HXTT Paradox 7.1.258
  HXTT PDF 2.0.258
  HXTT Text(CSV) 7.1.258
  HXTT Word 1.1.258
  HXTT XML 4.0.259
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
Delete row and index
Adam
2006-11-17 18:10:58
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
>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
 

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