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

default column definition of an empty csv
2014-11-27 21:04:47

this actually only aesthetic issue, here we have an empty headerless csv file with zero bytes size

when we issue select to this empty file, hxtt will return empty resultset with predefined 25 columns (column1 to column25)

the test query is:

select column1 as id, column26 as my_column from empty.csv

this csv file is generated by other program, and normally have about 150 columns, so when the file is empty, the query will return error "Invalid column or variable: column26"

is it possible to make the resultset column definition (ResultSet.getMetaData().getColumnLabel) matches the query so this error does not happen ?

thank you
Re:default column definition of an empty csv
HXTT Support
2014-11-28 04:45:23
_CSV_ColumnCount4EmptyFile: To specify the default column count for an empty text file without header information and data rows. Default: 25
You can use _CSV_ColumnCount4EmptyFile=150 connection property.

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