Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel v6.1
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.0
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
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 © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap