Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  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
 
  Buy Now
  Support
  Download
  Document
  FAQ
  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 Text(CSV)
Issue with max length of fields
Carmen Rodriguez
2016-02-17 09:27:47
Dear colleagues,
I'm creating a table like that:
CREATE TABLE IF NOT EXISTS T_EXAMPLE.CSV (TN_ID NUMERIC(18,0) NOT NULL...)

Currently when I insert a record in that table where the id is less than 18 digits, it completes the remaining digits with spaces. So what I see in the CSV file is:
1239 ;XXX;.....

This is causing a lot of troubles because when I afterwards retrieve this record by id to update it, Hibernate does not recognise it and creates a new record in the table.

The NUMERIC(18,0) should mean that this is the maximum length of the field but it should not modify the field with spaces until it reaches this length. Is there any way of avoiding this behaviour?

Regards,
Carmen
Re:Issue with max length of fields
HXTT Support
2016-02-18 05:44:48
You can use TN_ID int not null
Re:Re:Issue with max length of fields
Carmen Rodriguez
2016-02-19 03:30:20
But this will suppose changin all my hibernate mapping files and POJOs. Is there no way to maintain the data type but avoid the automatic insertion of blank spaces?
Re:Re:Re:Issue with max length of fields
HXTT Support
2016-02-19 08:12:19
Supported in the latest package.
Re:Re:Re:Re:Issue with max length of fields
Carmen Rodriguez
2016-02-22 03:14:23
Thanks

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 | Refund | Sitemap