Memo/clob in Excel |
Remco Schoen |
2009-06-23 08:10:50 |
Can the Excel-driver handle memo(clob) fields in Excel?
In my test I have cells that contain 300 characters. In the ODBC driver from Microsoft this leads to a memo data type for the column. In this JDBC-driver this doesn't happen, it becomes a varchar with a length of 255 characters, which is incorrect because the column contains more characters than 255.
I tried playing around with the parameter maxScanRows, but this doesn't influence the column data type.
Kind regards,
Remco
|
Re:Memo/clob in Excel |
HXTT Support |
2009-06-24 02:41:34 |
>which is incorrect because the column contains more characters than 255.
It's just a hint for column size, but you can use ResultSet.getString, ResultSet.getObject, or ResultSet.getClob, to fetch the correct result.
|
Re:Re:Memo/clob in Excel |
Remco Schoen |
2009-06-25 00:48:11 |
Our problem is not getting the information from Excel, but getting this information into another database.
We use the ResultMetaData to retrieve the length of the fields and use this information to create a new table in our database. Using the Excel driver this now gives truncate errors for cells with lots of information.
Could it be changed that it returns a memo data type for these fields? The driver looks promising for replacing the ODBC connector that we use now in our product. We rather replace it with a full Java-solution than another Microsoft-solution like OleDB.
With kind regards,
Remco
|
Re:Re:Re:Memo/clob in Excel |
HXTT Support |
2009-06-25 09:23:47 |
Please download the latest package, which has replaced VARCHAR type with LONGVARCHAR type.
|
Re:Re:Re:Re:Memo/clob in Excel |
Remco Schoen |
2009-06-26 03:23:37 |
I gave the new version (2.2.069) a try. I'm getting now LONGVARCHAR as the type for all the text-columns, so that seems to work.
But now I'm getting strange errors when I use DatabaseMetaData.getTables and these are hard to reproduce:
Caused by: java.lang.NoSuchMethodError: com.hxtt.global.ag.a(Ljava/lang/String;)Ljava/text/SimpleDateFormat;
at com.hxtt.sql.excel.ap.(Unknown Source)
at com.hxtt.sql.excel.b0.a(Unknown Source)
at com.hxtt.sql.excel.b0.a(Unknown Source)
at com.hxtt.sql.excel.bm.a(Unknown Source)
at com.hxtt.sql.excel.a0.new(Unknown Source)
at com.hxtt.sql.excel.a0.try(Unknown Source)
at com.hxtt.sql.excel.a0.(Unknown Source)
at com.hxtt.sql.excel.bg.a(Unknown Source)
at com.hxtt.concurrent.x.a(Unknown Source)
at com.hxtt.sql.excel.a0.if(Unknown Source)
at com.hxtt.sql.excel.v.if(Unknown Source)
at com.hxtt.sql.excel.v.a(Unknown Source)
at com.hxtt.sql.excel.v.a(Unknown Source)
at com.hxtt.sql.excel.v.a(Unknown Source)
at com.hxtt.sql.excel.v.if(Unknown Source)
at com.hxtt.sql.a.getTables(Unknown Source)
at org.apache.jsp.importwizard.databaseinfo.getTables_jsp._jspService(getTables_jsp.java:114)
... 38 more
This only happens the first time when I execute it. After that I just get an empty resultset. This didn't occur with version 2.2.066.
With kind regards,
Remco
|
Re:Re:Re:Re:Re:Memo/clob in Excel |
HXTT Support |
2009-06-26 22:35:07 |
>Caused by: java.lang.NoSuchMethodError:
>com.hxtt.global.ag.a(Ljava/lang/String;)Ljava/text/SimpleDateFormat;
Please check your class path, and remove all older packages from HXTT, or replace it with the latest packages, which are released on the same day.
|
Re:Re:Re:Re:Re:Re:Memo/clob in Excel |
Remco Schoen |
2009-06-30 01:44:33 |
I removed all the other drivers and then it worked.
Is it normal for your drivers, that they are dependent on each other?
|
Re:Re:Re:Re:Re:Re:Re:Memo/clob in Excel |
HXTT Support |
2009-07-01 22:38:54 |
>Is it normal for your drivers, that they are dependent on each other?
Yeah. They shared some common classes, and will work together with the same serail version.
|
Re:Re:Re:Re:Re:Re:Re:Re:Memo/clob in Excel |
Remco Schoen |
2009-07-03 02:39:33 |
Okay, that is good to know when using the drivers together. Thx.
|