Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.253
  HXTT Cobol 5.0.252
  HXTT DBF 7.1.253
  HXTT Excel 6.1.256
  HXTT Json 1.0.224
  HXTT Paradox 7.1.252
  HXTT PDF 2.0.252
  HXTT Text(CSV) 7.1.252
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Word 1.1.252
  HXTT XML 4.0.253
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)
Text driver: table name is null in connection's metadata
Michael
2020-08-20 05:14:43
Hello,

we are using your excel- and access driver for quite a while and are now planning to use yout text driver for accessing csv files. On our first steps we stumbled upon a problem with conncection.getMetaData().getColumns(): the value for tableName is null!

i can provide a litte test programm that shows the issue

Class.forName("com.hxtt.sql.text.TextDriver");
Connection con = DriverManager.getConnection("jdbc:csv:/C:/Users/mw/Desktop/csv/treiber.csv?_CSV_Header=true;_CSV_Separator=\\x3B", "", "");
ResultSet resultSet = null;

resultSet = con.getMetaData().getColumns(null, "dbo", null, null);

while (resultSet.next()) {

String tableName = resultSet.getString("TABLE_NAME");
String column = resultSet.getString("COLUMN_NAME");
System.out.println(tableName+"."+column);
}

Output is:
null.Datum
null.Dauer
null.Beschreibung
null.Aufgabe
null.Jira-TicketNr
null.MA-Kurz
null.JIRA_FIXVERSIONS

column names are correct but table name should be "treiber", i suppose? At least "select * from treiber" works.

Is there something we miss? Querying the metadata ist essential for our application

Regards,
Michael
Re:Text driver: table name is null in connection's metadata
HXTT Support
2020-08-20 06:27:18
Fixed. Pleasedownload the latest package.

BTW, you should consider user " or [] to enclosing your column name, since maybe it contains space in CSV file header.

System.out.println(tableName + ".\"" + column+"\"");
System.out.println(tableName + ".[" + column+"]");

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