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
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  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)

HXTT Excel
Error
Chi Thien Phan
2015-12-16 03:36:12
hi,

i can not load data from my excel file cause following error. The demo excel file i will send you via mail.

java.sql.SQLException: Failed to go Rowid 21 of table Abwesenheit:There're only row 28 but you wish to get row 29.
at com.hxtt.global.SQLState.setNextException(Unknown Source)
at com.hxtt.sql.excel.b1.a(Unknown Source)
at com.hxtt.sql.dt.a(Unknown Source)
at com.hxtt.sql.ck.a(Unknown Source)
at com.hxtt.sql.ck.a(Unknown Source)
at com.hxtt.sql.af.y(Unknown Source)
at com.hxtt.sql.d1.a(Unknown Source)
at com.hxtt.sql.d1.a(Unknown Source)
at com.hxtt.sql.de.try(Unknown Source)
at com.hxtt.sql.de.next(Unknown Source)
at HTXX_Excel.main(HTXX_Excel.java:18)

thx!
best regards,
Re:Error
HXTT Support
2015-12-17 06:05:05
Checked.
select * from "Excel_Demo_2".Abwesenheit
will recur your issue.
It happened because your sheet information is 29 rows, but it's 28 rows in fact.
You should use MS Excel to open it, then save simply it without any modification. Then you can use HXTT Excel to query it.
Re:Re:Error
Chi Thien Phan
2015-12-18 05:34:07
Sorry for imprecise description. You can reproduce this issue like following:

1. insert new record
2. remove the new record
3. execute the select statement

That is a bug of driver when you try execute following code. The new demo excel file i will send you via mail.
thx!
best regards,

-------------------------------------------------------------------------


public static void main(String[] args) {
try {
Class.forName("com.hxtt.sql.excel.ExcelDriver");
Connection conn = DriverManager.getConnection("jdbc:excel:/Excel_Demo_Urlaub.xls?maxScanRows=0&caseInsentive=true&delayedClose=0");
String insert = "INSERT INTO \"Excel_Demo_Urlaub\".\"Abwesenheit\" (Beginn, Ende, ID, Personalnummer, Typ) VALUES (?, ?, ?, ?, ?)";
PreparedStatement stmt1 = conn.prepareStatement(insert);
int colCounter = 1;
stmt1.setDate(colCounter++, new Date(2015,11,30));
stmt1.setDate(colCounter++, new Date(2015,12,05));
stmt1.setDouble(colCounter++, 21.0);
stmt1.setDouble(colCounter++,1017.0);
stmt1.setString(colCounter++,"Urlaub");
stmt1.execute();
stmt1.close();

String delete = "DELETE FROM \"Excel_Demo_Urlaub\".\"Abwesenheit\" WHERE ID = ?";
PreparedStatement stmt2 = conn.prepareStatement(delete);
colCounter = 1;
stmt2.setDouble(colCounter++, 21.0);
stmt2.execute();
stmt2.close();


String query ="\r\n" +
"select \r\n" +
"Abwesenheit.\"Beginn\" ID25405,\r\n" +
"Abwesenheit.\"Ende\" ID25408,\r\n" +
"Abwesenheit.\"ID\" ID25411,\r\n" +
"Abwesenheit.\"Personalnummer\" ID25414,\r\n" +
"Abwesenheit.\"Typ\" ID25417\r\n" +
" from \r\n" +
"\"Excel_Demo_Urlaub\".\"Abwesenheit\" Abwesenheit\r\n" +
" where 1=1 and \r\n" +
"(((((Abwesenheit.\"Personalnummer\" in (1000.0,1001.0,1002.0,1003.0,1004.0,1005.0,1006.0,1007.0,1008.0,1009.0,1010.0,1011.0,1012.0,1013.0,1014.0,1015.0,1016.0,1017.0,1018.0,1019.0))))))";
Statement stmt = conn.createStatement();
ResultSet resultSet = stmt.executeQuery(query);
resultSet.getMetaData();

while (resultSet.next()) {
System.out.println("-------------------------------------");
for(int i = 1; i < 5; i++){
System.out.println(resultSet.getObject(i));
}
}
resultSet.close();
stmt.close();
conn.close();
} catch (Exception e) {
e.printStackTrace();
}
}
Re:Re:Re:Error
HXTT Suport
2015-12-24 05:40:06
Supported. Please download the latest package.
Re:Re:Re:Re:Error
Chi Thien Phan
2016-01-05 04:38:09
hi,

thx for the new version! It workts fine now.

best regards,
gtt

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