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
   
   
   
Heng Xin Tian Tai Ltd. of Beijing City (abbr, HXTT)

HXTT DBF
can not load NTX index to dbf file
olivier chen
2017-04-20 07:48:24.0
/*
i don't know why my dbf file cannoy load ntx this is my prgms
*/

import java.sql.*;
import java.util.Properties;
import com.hxtt.*;
public class test {
public static void main(String[] args) {
try {
Class.forName("com.hxtt.sql.dbf.DBFDriver").newInstance();
Properties p= new Properties();
//p.setProperty("DefaultExtension","NTX");
p.setProperty("Default Index Suffix","NTX");
p.setProperty("DefaultNTXExtension","AFAIRER.NTX");// the file is AFAIRER.NTX


p.setProperty("loadIndices","true");
//p.setProperty("Incremental Index","NTX");
//p.setProperty("COMPACTEDINDEX","false");
Connection conn = DriverManager.getConnection("jdbc:dbf:///s:/Tempo/Chen/AG.mloc/DATA/GLO",p);
String sql ="Select * from AFAIRE";
PreparedStatement stmt=conn.prepareStatement(sql);
ResultSet rs = stmt.executeQuery(sql);
ResultSetMetaData resultSetMetaData = rs.getMetaData();
int iNumCols = resultSetMetaData.getColumnCount();
Object colval;
for (int i = 1; i <= iNumCols; i++) {
System.out.println(resultSetMetaData.getColumnLabel(i)
+ " " +
resultSetMetaData.getColumnTypeName(i));
}
while (rs.next()) {
for (int i = 1; i <= iNumCols; i++) {
colval = rs.getObject(i);
System.out.print(colval + " ");
}
System.out.println();
}
rs.close();
stmt.close();
conn.close();
}catch (Exception e) {
System.out.println(e.getMessage());
e.printStackTrace();
}

}
}
Re:can not load NTX index to dbf file
HXTT Support
2017-04-20 08:36:27.0
>p.setProperty("DefaultNTXExtension","AFAIRER.NTX")
p.setProperty("DefaultNTXExtension","NTX");//You can skip that property since NTX is default value.

Select * from AFAIRE;//But your NTX file is AFAIRER.NTX?
If so, you should use a AFAIRE.CGP file which contains one text line: AFAIRER.NTX

Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 1999-2017 Heng Xin Tian Tai Ltd. of Beijing City. | All Rights Reserved. | Privacy | Legal | Sitemap