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
  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)

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


Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap