Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.142
  HXTT Cobol 5.0.142
  HXTT DBF 7.1.143
  HXTT Excel 6.1.146
  HXTT Json 1.0.114
  HXTT Paradox 7.1.142
  HXTT PDF 2.0.142
  HXTT Text(CSV) 7.1.142
  Buy Now
  HXTT Word 1.1.142
  HXTT XML 4.0.143
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)

Insertion of binary values results in null inserted values
Rodolfo Martin
2005-03-21 00:00:00.0
I create a sql file with the following create table command:
(create table if not exists Table (FLAGS BINARY(2) NOT NULL,...).
I use it as schema file, create a dataSource and a spring's JdbcTemplate with it, that I use to insert and select information from the table.
Everything was working OK, except this:

When inserting a byte[] with any value != 00 the insert is ok, but if the byte [] contains 00 the value inserted is null. The NOT NULL constraint seems to have no effect.

Worse: retrieving such data returns null instead the expected byte[].

Is this the expected behaviour? I noticed that querying through Admin server the column shows object references.
Thanks in advance.

Rodolfo Martin
Re:Insertion of binary values results in null inserted values
HXTT Support
2005-03-22 00:00:00.0
Dear Rodolfo Martin,

Yeah. HXTT Text will take a value stuffed with '\0' as null value for binary type and varbinary type. NULL/NOT NULL constraint is ignored by HXTT Text now. A value stuffed with space characters is null value for char type and varchar type too.

With best regards,

Dai Wei
Re:Re:Insertion of binary values results in null inserted values
HXTT Support
2005-03-26 00:00:00.0
The latest package won't rtrim value or return null value for char type and binary type now.

Search Key   Search by Last 50 Questions


Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap