Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 6.0.061
  HXTT Cobol 3.0.061
  HXTT DBF 6.0.064
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel 5.0.064
  HXTT Paradox 6.0.061
  HXTT Text(CSV) 6.0.062
  HXTT XML 2.0.061
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 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 Xing Tian Tai Lab of Beijing City. | All Rights Reserved. | Privacy | Legal | Sitemap