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
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  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 Text(CSV)
Trying to create a fixed length file
Raul Martins
2016-07-07 20:23:39.0
Hi,

I'm trying to create a fixed length .txt file using the following sentence:
CREATE TABLE IF NOT EXISTS PRUEBA(CAMPO1 CHAR(20), CAMPO2 CHAR(20), CAMPO3 CHAR(20), CAMPO4 CHAR(20), CAMPO5 CHAR(20),_StuffedColumn char(1) default '|CRLF|')

My connection properties are: "fileExtension=txt;"
I'm using driver 3.0 version.

This is the resulting txt file content after creating 6 records:

HXTT's Binary Data File
Please don't modify manually any byte, otherwise it's possible to lose data!
 x ������ w      t CAMPO1pw     t CAMPO2pw     t CAMPO3pw     t CAMPO4pw     t CAMPO5pw     t 
w t _StuffedColumnp13 D02 0 INICIAL
14 D02 0 INICIAL
15 D02 0 INICIAL
16 D02 0 INICIAL
17 D02 0 INICIAL
18 D02 0 INICIAL

How can I get rid of the starting binnary data?

Thank you!!
Re:Trying to create a fixed length file
HXTT Support
2016-07-08 05:23:36.0
You should login to download the latest package, which won't create that header.

For your older package, you need to prepare a zero-byte length (empty) file, then your crete table sql won't create starting binnary data.
Re:Re:Trying to create a fixed length file
Raul Martins
2016-07-13 17:41:07.0
Hi,

I downloaded the latest jdbc and found a new problem: NoSuchMethodError
This is my pgm stack:

19:38:19,905 main INFO EtlService:181 - Initialize connections...
Exception in thread "main" java.lang.NoSuchMethodError: com.hxtt.sql.d1.a(ILjava
/lang/String;Ljava/util/Properties;)Lcom/hxtt/concurrent/ae;
at com.hxtt.sql.text.EmbeddedDriver.connect(Unknown Source)
at com.hxtt.global.SQLState.getConnection(Unknown Source)
at com.hxtt.sql.HxttDriver.if(Unknown Source)
at com.hxtt.sql.HxttDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
erConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable
ConnectionFactory.java:582)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas
icDataSource.java:1556)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFacto
ry(BasicDataSource.java:1545)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:1388)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:1044)
at mx.cimatic.etl.utils.DAOHelper.createDao(DAOHelper.java:124)
at mx.cimatic.etl.services.EtlServiceImpl.initializeConnections(EtlServi
ceImpl.java:254)
at mx.cimatic.etl.services.EtlServiceImpl.processEtlConfig(EtlServiceImp
l.java:182)
at mx.cimatic.etl.services.EtlServiceImpl.initialize(EtlServiceImpl.java
:125)
at mx.cimatic.etl.Main.start(Main.java:47)
at mx.cimatic.etl.Main.main(Main.java:30)

What do I need to change?

Best regards
Re:Re:Re:Trying to create a fixed length file
Hxtt Support
2016-07-14 04:24:09.0
>Exception in thread "main" java.lang.NoSuchMethodError: com.hxtt.sql.d1.a(ILjava
/lang/String;Ljava/util/Properties;)Lcom/hxtt/concurrent/ae;

You need to check your classpath, and remove all other older jar files from HXTT. If you're using other JDBC driver from HXTT, you should download the latest package also.
Re:Re:Re:Re:Trying to create a fixed length file
Raul Martins
2016-07-14 17:04:00.0
Hello,

I could isolate the two drivers that can not be together: Text and Excel
It happen for both 3.0 and 4.0 versions.

Other drivers work properly.

If I leave Text driver alone -or without Excel driver- it runs properly and generates the text file as I needed. Thank you!

I hopy you can help me with this new problem.

Best regards
Re:Re:Re:Re:Re:Trying to create a fixed length file
HXTT Support
2016-07-14 22:28:41.0
>I hopy you can help me with this new problem.
Both of Text and Excel should be released at the same day.
Re:Re:Re:Re:Re:Re:Trying to create a fixed length file
Raul Martins
2016-07-18 08:44:27.0
Hi,

I found in Excel download page drivers dated on 2016-01-04 but in Text driver they are dated 2015-11-21.

How can I get either Excel driver from 2015-11-21 or Text driver from 2015-11-21?

Thank you
Re:Re:Re:Re:Re:Re:Trying to create a fixed length file
Raul Martins
2016-07-18 08:45:29.0
Sorry,
I was trying to say "Text driver from 2016-01-04"

Re:Re:Re:Re:Re:Re:Re:Re:Trying to create a fixed length file
HXTT Support
2016-07-18 09:13:54.0
Ajusted so that you can download the same serial version. BTW, you should consider renewing to get the latest package.
Thank you!
Raul Martins
2016-07-18 11:21:23.0
Thank you for your help.
It works now.

We just finished fixing some backward compatibility issues and we plan to move to 4.0 shortly.

Moving to 4.1 or 4.2 could take a while...
Re:Re:Re:Re:Re:Re:Re:Re:Trying to create a fixed length file
HXTT Support
2016-07-19 04:42:30.0
JDBC 3.0, 4.0, 4.1, and 4.2, packages are released at the same version serial for different Java VM version. Your version was stayed at 2016 Jan, and you can choose to renew your license to get the latest pakage, only when you want.

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