Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.142
  HXTT Cobol 5.0.142
  HXTT DBF 7.1.143
  HXTT Excel 6.1.146
  Buy Now
  HXTT Json 1.0.114
  HXTT Paradox 7.1.142
  HXTT PDF 2.0.142
  HXTT Text(CSV) 7.1.142
  HXTT Word 1.1.142
  HXTT XML 4.0.143
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 Excel
HXTT get Tables, examples/docs are terrible please help
2008-07-12 06:45:58.0
Yes we understand and did that before we contacted you. Your example shows how to do it with JDBC but you are calling getTables() on what Excel file (database)? No where in your example do you describe how to connect to a data base without specifying the table ("database"."table").

jdbc:excel:/" or "jdbc:excel:///". Then you can use some full UNC path names in SQL to visit anywhere where your Java VM has right to access.
For instance:
select * from \\amd2500\e$\excelfiles\test;
elect * from "\\amd2500\d$\exceliles".test;
select * from ".".test;

IF we connect to DB and call getTables() on the connection it fails, naturally as expected since the driver does not know which database (Excel File to use).

The HXTT driver throws exceptions.. here is the code, here is exception..

09:25:05,966 ERROR [STDERR] java.lang.NullPointerException
09:25:05,967 ERROR [STDERR] at com.hxtt.sql.excel.v.a(Unknown Source)
09:25:05,967 ERROR [STDERR] at com.hxtt.sql.excel.v.a(Unknown Source)
09:25:05,967 ERROR [STDERR] at com.hxtt.sql.excel.v.a(Unknown Source)
09:25:05,967 ERROR [STDERR] at com.hxtt.sql.excel.v.if(Unknown Source)
09:25:05,967 ERROR [STDERR] at com.hxtt.sql.a.getTables(Unknown Source)
09:25:05,967 ERROR [STDERR] at

HERE iS CODE... Connection is established. We can query Excel file but only as long as we provide table name. IF we try and get the tbales using getTables() it fails. How do we specify the database to use before we execute the following code?

ResultSet set = null;
try {

//String[] types = new String[2];
//types[0] = "TABLE";
//types[1] = "SYSTEM TABLE";

//Statement stmnt = this.conn.createStatement();

set = this.conn.getMetaData().getTables(null,null,"%",null);

if ( set==null) logger.log( "NFO", "HDX.HDXReqIFC.HDXDBUtil", "getTables() META is NULL", this.conn.getWarnings().toString() );

this.rslt = new ArrayList();

while( ) {

LinkedHashMap rec = new LinkedHashMap();

logger.log( "NFO", "HDX.HDXReqIFC.HDXRest", "TABLETABLE:::", set.getString(3) );

rec.put( "table", set.getString(3) );



} catch (Exception e) {


} finally {

try {
if ( set!=null ) set.close();
set = null;
} catch (SQLException e) {

Re:HXTT get Tables, examples/docs are terrible please help
HXTT Support
2008-07-12 07:12:27.0
1st solution
url = "jdbc:excel:/\\\\amd2500\\f$/excelfiles";
2nd solution
url = "jdbc:excel:///";

>09:25:05,966 ERROR [STDERR] java.lang.NullPointerException
Thanks. It will disappear in the next package.

Search Key   Search by Last 50 Questions


Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap