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)
Driver converts non-doubles to doubles
Remco Schoen
2009-09-04 07:58:19.0
Hello,

If I have a record like this in csv:

1;1.000,1;1,000.1;"1.000,0"

It also returns the third and fourth column as a double. The third column isn't a valid double, so I would expect a longvarchar. The fourth column has quotes around it indicating a LONGVARCHAR and still is getting parsed as a double.

Is this the correct behaviour?

With kind regards,

Remco Schoen
Currently researching the usability of the driver for use in our product TOPdesk
Re:Driver converts non-doubles to doubles
HXTT Support
2009-09-06 09:43:12.0
Supported. Please download the latest pacakge, which won't use ',' as default decimalSeparator.
Re:Re:Driver converts non-doubles to doubles
Remco Schoen
2009-09-08 07:09:59.0
With the driver version 2.2.087 the problem still persists.

With decimalSeparator=,;groupingSeparator=. it returns the value 1,000.1 as a double 1.0, it seems to neglect the .1 at the end.

The value "1.000,1" still gets returned as a double, although it is a string.
Re:Re:Re:Driver converts non-doubles to doubles
HXTT Support
2009-09-08 07:41:18.0
You can use decimalSeparator=;groupingSeparator= or remove simply both connection properties form your url. Then it won't be parse as double.
Re:Re:Re:Re:Driver converts non-doubles to doubles
Remco Schoen
2009-09-08 08:12:25.0
But then my doubles as well aren't read as doubles and that would mean it is not possible to have a table with multiple data types.

And not setting the connection properties at all gives the same problem, but the other way around.
Re:Re:Re:Re:Re:Driver converts non-doubles to doubles
HXTT Support
2009-09-08 08:28:35.0
>The value "1.000,1" still gets returned as a double, although it is a string.
HXTT Text will detect it, and remove ".

>it returns the value 1,000.1 as a double 1.0, it seems to neglect the .1
>at the end.
Yeah. It seems lame, and we will try to find a solution.
Re:Re:Re:Re:Re:Re:Driver converts non-doubles to doubles
HXTT Support
2009-09-08 08:41:58.0
>it returns the value 1,000.1 as a double 1.0, it seems to neglect the .1
>at the end.
A double with 1.0001 or a string "1,000.1", what's your want result?
Re:Re:Re:Re:Re:Re:Re:Driver converts non-doubles to doubles
Remco Schoen
2009-09-08 08:55:14.0
I would expect a string, because it doesn't look like a double. The point is a thousand separator and can not come after the decimal separator.
Re:Re:Re:Re:Re:Re:Re:Re:Driver converts non-doubles to doubles
HXTT Support
2009-09-09 09:04:36.0
Supported.
Re:Re:Re:Re:Re:Re:Re:Re:Driver converts non-doubles to doubles
Remco Schoen
2009-09-10 04:10:15.0
This works now for the use-case of 1.000,1, it returns a longvarchar now.

Let me explain the other case with the quotes and why I test it like that. We get data-files from our customers and they can contain personnelnumbers. With most companies this is a number, but sometimes it can be a string as well and most times it is exported as a string with quotes. An example of these strings could be, that they put an E in front of the number, when it is an external person.

If this number with an E appears after the rows, that are examined for type guessing, the reading will fail with an exception, that it can not convert the value to a number.

That is why we ask our customers to add quotes to strings, so that it is for certain a string when reading the file. The ODBC driver of Microsoft does also see these values as strings, when they have quotes.

I hope this use-case is clear and can be supported.
Re:Re:Re:Re:Re:Re:Re:Re:Driver converts non-doubles to doubles
HXTT Support
2009-09-10 22:26:02.0
Supported. Please download the latest package.
Re:Re:Re:Re:Re:Re:Re:Re:Driver converts non-doubles to doubles
Remco Schoen
2009-09-15 03:33:40.0
Cool, this now works as expected.

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