Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.259
  HXTT Cobol 5.0.258
  HXTT DBF 7.1.260
  HXTT Excel 6.1.262
  HXTT Json 1.0.230
  HXTT Paradox 7.1.258
  HXTT PDF 2.0.258
  HXTT Text(CSV) 7.1.258
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Word 1.1.258
  HXTT XML 4.0.259
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)

HXTT Text(CSV)
Validation of CSV
Johnathan
2016-04-27 11:32:03
Dear Sir/Madam,

I am contacting you in regards to the HXTT Text (CSV) JDBC 3.0 Package.

My question is if there is a method to validate the CSV file and report the problems, prior to executing the select statements on a CSV file.

If there is no such possibility, can you recommend a way to check if a CSV is valid (maybe the parser / query does not raise an error even if there is one). Or even by using a third party tool.

Thank you for your time and assistance.

Best regards,

Johnathan
Re:Validation of CSV
HXTT Support
2016-04-28 06:41:55
>My question is if there is a method to validate the CSV file and report the problems, prior to executing the select statements on a CSV file.
CSV file will be validated when it load."Select count(*) from acsvfile" will check that file.

ignoreDirtyData connection property: Indicates whether ignores all dirty data and return null value when failed to parse number value or date value. You can use the following code to know where's dirty data in your file.

warnings=rs.getWarnings();
if(warnings!=null){
do{//SQState: C0106 Convert dirty data into null value
System.out.println(warnings.getMessage());
System.out.println("Error Code:"+warnings.getErrorCode());
System.out.println("SQL State:"+warnings.getSQLState());
}while((warnings=warnings.getNextWarning())!=null);
rs.clearWarnings();
}

Default value: false


Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Refund | Sitemap