Hi,
I've got a strange problem: when I read an Access table with a simple ResultSet the data from a Memo column is readable:
Class.forName("com.hxtt.sql.access.AccessDriver").newInstance();
// Please see Connecting to the Database section of Chapter 2.
// Installation in Development Document
// Please change "demodata" to your database directory
String url = "jdbc:Access:///" + database;
// Please replace with your query statement.
// You should read SQL syntax in HXTT Access Development Document
String sql = "select * from " + this.tablename;
Connection con = DriverManager.getConnection(url, "", "");
Statement stmt = con.createStatement();
//stmt.setFetchSize(10);
ResultSet rs = stmt.executeQuery(sql);
However when I do the same with the HxttAccessDialect and Hibernate the data is unreadable. The specific field of the record only has two different characters in the String, with no match with the original contents in Access.
This is my hibernate mappig (the column is coordinaten)
My hibernate properties are:
hibernate.dialect=com.hxtt.support.hibernate.HxttAccessDialect
Any clue?
Kind regards, Vincent
|
Again the hibernate mapping (without the xml tags):
hibernate-mapping
class dynamic-update="true" lazy="false" table="C_VIVALDIWEGVAK" dynamic-insert="true" name="com.trafficits.cdms.model.CdmsVivaldiwegvak"
id name="id" column="id"
generator class="assigned"
id
many-to-one unique="true" name="cdmsWegVak"
column name="idwegvak"
many-to-one
property name="coordinaten" column="coordinaten"
class
hibernate-mapping
|
Did some more investigations. It isn't hibernate related. The simple ResultSet now does the same, but not on all tables with memo fields!
Might this be an incompatibility with Access 2007? My tables are originally Access 2000/2003, but are edited with Access 2007.
Vincent
|
>Might this be an incompatibility with Access 2007? My tables are originally
>Access 2000/2003, but are edited with Access 2007.
Yeah. MS Access 2007 seems do minor change for LONGVARCHAR type storage. Please download the latest package.
|
The patch works better, but for large memo fields (e.g. 326 characters) I still receive the wrong characters.
Vincent
|
>but for large memo fields
Please download the latest package, which has removed that limitation.
|