Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  HXTT Cobol v2.1
  HXTT DBF v5.2
  Buy Now
  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
Heng Xin Tian Tai Ltd. of Beijing City (abbr, HXTT)

can not delete record
2005-07-11 00:00:00.0
below i post my code :

import java.util.*;
import java.sql.*;
import com.hxtt.sql.*;

public class backofficeDbfVerification {

Connection connection;
/** Creates a new instance of backofficeDbfVerification */
public backofficeDbfVerification(String path, Properties prop) throws SQLException {
try {
connection = DriverManager.getConnection("jdbc:DBF:/"+path, prop);
catch (ClassNotFoundException classnotfoundexception) {
System.out.println("could ot find HXTT class, make sure the classpath have been defined in your system !");

public void createGoodRecord(String table, int blth) throws SQLException {
Statement stmt = connection.createStatement();
String delete = "delete from '"+table+"' where VAL(substring(blth,3,4)+substring(blth,1,2)) < "+blth;
boolean bdelete = stmt.execute(delete);

public ResultSet querySomeData(String table) throws SQLException {
Statement stmt = connection.createStatement();
String query = "select * from '"+table+"' where VAL(substring(blth,3,4)+substring(blth,1,2)) < 200310";
ResultSet result = stmt.executeQuery(query);
return result;

public static void main (String args[]) {
Properties pp = new Properties();
pp.setProperty("user", "");
String path = "C:\\JATIM\\MLPOV2\\DKI\\temp\\SOREK";
String pathCopy = "C:\\JATIM\\MLPOV2\\DKI\\source\\SOREK";
try {
backofficeDbfVerification test = new backofficeDbfVerification(path, pp);
test.createGoodRecord("5462154", 200310);
catch(SQLException sqx) {
System.out.println("Error "+sqx.getMessage());


when i perform delete action, no record deleted form the file (the record still exist as i check the table using visual foxpro), but no record are retrieved too when i perform method querySomeData().

i really don't know what exactly happens, the record still exists after i deleted them, but norecords retrieved from query action....

please help...
Re:can not delete record
HXTT Support
2005-07-11 00:00:00.0
Because those rows are just marked with a DELETED flag according to Xbase stanadard, so that VFP can see those deleted rows. If you wish to remove those deleted rows permanently, you should use "PACK TABLE yourTable;" once.

Search Key   Search by Last 50 Questions


Copyright © 1999-2017 Heng Xin Tian Tai Ltd. of Beijing City. | All Rights Reserved. | Privacy | Legal | Sitemap