Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  HXTT Json v1.0
  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 ACCESS
access memo field with hibernate
Vincent
2009-07-11 03:35:52.0
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
add: access memo field with hibernate
Vincent
2009-07-11 03:38:36.0
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
Re:Re:access memo field with hibernate
Vincent
2009-07-13 12:14:14.0
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
Re:Re:Re:access memo field with hibernate
HXTT Support
2009-07-25 02:33:00.0
>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.
Re:Re:Re:Re:access memo field with hibernate
Vincent
2009-08-12 13:38:07.0
The patch works better, but for large memo fields (e.g. 326 characters) I still receive the wrong characters.

Vincent
Re:Re:Re:Re:Re:access memo field with hibernate
HXTT Support
2009-08-13 09:29:05.0
>but for large memo fields
Please download the latest package, which has removed that limitation.

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