Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  HXTT Cobol v2.1
  HXTT DBF v5.2
  HXTT Excel v4.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  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
   
   
   
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

HXTT Excel
Support for metadata calls in HXTT Excel JDBC driver
Damodar Periwal
2006-12-31 15:26:29.0
Does HXTT Excel JDBC driver support all database metadata calls (for example, metadata.getTables() or metadata.getColumns())?
Re:Support for metadata calls in HXTT Excel JDBC driver
Damodar Periwal
2006-12-31 15:27:18.0
Does HXTT Excel JDBC driver support all database metadata calls (for example, metadata.getTables() or metadata.getColumns())?
Re:Re:Support for metadata calls in HXTT Excel JDBC driver
HXTT Support
2006-12-31 18:19:23.0
Yeah.
Re:Re:Re:Support for metadata calls in HXTT Excel JDBC driver
Damodar Periwal
2007-01-17 19:14:44.0
My worksheet has three columns - name, age, and weight. There is one row of data with values (Harry, 45, 130.7). I tried using the getColumns() call on this worksheet with your driver, as follows:

ResultSet columns = dbMetaData.getColumns(null, schema, tableName, "%");
column = new ColumnInfo(
columns.getString(4/*"COLUMN_NAME"*/),
columns.getShort(5/*"DATA_TYPE"*/),
columns.getString(6/*"TYPE_NAME"*/),
columns.getInt(7/*"COLUMN_SIZE"*/), // PRECISION
columns.getInt(9/*"DECIMAL_DIGITS"*/), // SCALE
columns.getInt(17/*ORDINAL_POSITION*/)
);

For DATA_TYPE, TYPE_NAME, and PRECISION, I am getting the values of 2000, JAVA_OBJECT, and 4 respectively for each of the three columns (name, age, and weight). Is that the expected result? How can we get more appropriate data types, for example, java.sql.Types.INTEGER for an integer columnn, and java.sql.Types.CHAR for a string column, etc.?

Thanks,

-- Damodar
Re:Re:Re:Re:Support for metadata calls in HXTT Excel JDBC driver
HXTT Support
2007-01-24 20:57:14.0
>Is that the expected result?
Yeah. HXTT Excel accepts all data types( int, char, double, date, timestamp, and so on), so it uses java_object as date type.

>How can we get more appropriate data types, for example,
> java.sql.Types.INTEGER for an integer columnn, and java.sql.Types.CHAR for a
> string column, etc.?
You need to check the data rows. If ResultSet.getObject() returns java.lang.Integer, java.sql.Date, java.lang.String, ..., you can know it's possible int, date, or char.
Re:Re:Re:Re:Re:Support for metadata calls in HXTT Excel JDBC driver
Damodar Periwal
2007-02-05 16:48:57.0
>Yeah. HXTT Excel accepts all data types( int, char, double, date, timestamp, and so on), so it uses java_object as date type.

But as per the following documentation about the DatabaseMetaData
.getColumns() method:

http://java.sun.com/j2se/1.3/docs/api/java/sql/DatabaseMetaData.html#getColumns(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)

the DATA_TYPE parameter of the resultset is supposed to return the SQL type from java.sql.Types. However, the java_object value returned by HXXT Excel implementation is some fixed value no matter what the actual data type for the underlying column is. As per the specification, the data type should be something like java.sql.Types.INTEGER, java.sql.Types.FLOAT, java.sql.Types.CHAR, etc. So your implementation of the getColumns() method does not seem to be compliant to the JDBC standard specification. Do you agree?

Thanks,

-- Damodar
Re:Re:Re:Re:Re:Re:Support for metadata calls in HXTT Excel JDBC driver
Damodar Periwal
2007-02-05 16:52:58.0
>However, the java_object value returned by HXXT Excel implementation
I meant the fixed value of 2000
Re:Re:Re:Re:Re:Re:Re:Support for metadata calls in HXTT Excel JDBC driver
denis
2007-03-26 12:07:42.0
Hello,
I have the same problem,
Have you find a solution?

Thanks for your help,
Oliver
Re:Re:Re:Re:Re:Re:Re:Support for metadata calls in HXTT Excel JDBC driver
denis
2007-03-26 14:09:00.0
Hello,
I have the same problem,
Have you find a solution?

Thanks for your help,
Oliver
Re:Re:Re:Re:Re:Re:Re:Re:Support for metadata calls in HXTT Excel JDBC driver
HXTT Support
2007-03-27 01:13:35.0
Denis,
v1.1.010 provides maxScanRows connection property for data auto data type detection, but it still supports using different data types for a column. You should be using an older package.

Search Key   Search by Last 50 Questions




Google
 

Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Email: webmaster@hxtt.com
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap