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
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
  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 Excel
Error
Chi Thien Phan
2015-12-16 03:36:12.0
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.0
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.0
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.0
Supported. Please download the latest package.
Re:Re:Re:Re:Error
Chi Thien Phan
2016-01-05 04:38:09.0
hi,

thx for the new version! It workts fine now.

best regards,
gtt

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