SQLState 22000, Exception: "Please move the cursor to a data row first!" |
Timo |
2006-08-23 08:15:14 |
Today, i have bought a license for HXTT ACCESS. But when i execute following SQL92-compliant Statement
SELECT customerNumber , COUNT(*) AS FREQ FROM (SELECT * FROM Orders cn ) a GROUP BY customerNumber
i receive an Exception with the following text:
"Please move the cursor to a data row first!"
The Exception is thrown after this peace of code:
Statement = Connection.createStatement();
ResultSet = Statement.executeQuery(SQLString);
Any ideas? Any hints? Other SELECT-Statements work perfectly..
|
Re:SQLState 22000, Exception: |
HXTT Support |
2006-08-23 08:40:34 |
Passed test with the latest package.
What's your code?
You should call if(rs.next()){//Or while(rs.next()){
//... rs.getObject(...)
}
Orders table is a physical table or a view?
|
Re:Re:SQLState 22000, Exception: |
Timo |
2006-08-24 00:14:09 |
Hi,
thanks for your reply. The following code is not executed, the call:
rs = statement.executeQuery(sql);
isn't executed and fails with this exception :-(
"Orders" is a physical table, where customerNumber is INTEGER(4)
What else can I do? Thanks for your help
Greetings,
Timo
|
Re:Re:Re:SQLState 22000, Exception: |
HXTT Support |
2006-08-24 00:23:17 |
|
Failed to recur, please email us your mdb file sample. Thanks.
|
Re:Re:Re:Re:SQLState 22000, Exception: |
HXTT Support |
2006-08-24 00:25:37 |
You can use ftp service too:
ftp site: ftp.hxtt.com
ftp user: anonymous@hxtt.com
ftp password: (empty)
login mode: normal (not anonymous)
ftp port:21
upload directory: incoming
After upload, you can't see that upload file, but it has been upload.
then notify us.
|
Re:Re:Re:Re:Re:SQLState 22000, Exception: |
Timo |
2006-08-24 00:59:04 |
I've uploaded the MDB via FTP. The filename is "ClassicModels.mdb"
Here are my lines of code:
private java.sql.Connection Connection;
private java.sql.Statement Statement;
Connection=java.sql.DriverManager.getConnection(DBUrl, dbProps);
ConnectionTime=new Date();
Statement = Connection.createStatement();
/** Following call fails with my Statement **/
ResultSet = Statement.executeQuery(SQLString);
ResultSetPosition = 1;
MetaData = new ResultSetMetaData();
MetaData.setColumnCount(ResultSet.getMetaData().getColumnCount());
Other statements with the same code work perfectly. Thanks for help!
Timo
|
Re:Re:Re:Re:Re:Re:SQLState 22000, Exception: |
HXTT Support |
2006-08-24 02:19:13 |
|
Download and removed that mdb file from our server. Recurred. Thanks.
|
Re:Re:Re:Re:Re:Re:Re:SQLState 22000, Exception: |
HXTT Support |
2006-08-24 04:04:07 |
Supported. Please download the latest JDBC3.0 package. Thans for your help.
BTW,
>SELECT customerNumber , COUNT(*) AS FREQ FROM (SELECT * FROM Orders cn ) a GROUP BY customerNumber
The preferable sql is:
SELECT customerNumber, COUNT(*) FROM Orders a GROUP BY customerNumber
|
Re:Re:Re:Re:Re:Re:Re:Re:SQLState 22000, Exception: |
Timo |
2006-08-24 05:32:00 |
Perfect! It works now, thank you. Great support :-) The SELECT Statement is auto-generated by an application.
BTW: I use this Driver with RMI. If a table has a DATE Column, this column is not serializable over RMI. On the client, i get an exception: Class not found: com.hxtt.global.q But if i add the JAR to the CLIENT Classpath (the SERVER does all the DB work) it works perfectly. Using other JDBC Drivers (Oracle, DB2, SQL Server,..) it is not necessary to add the JDBC Jars into the CLIENT-Classpath.
Greetings from Germany,
Timo
|
Re:Re:Re:Re:Re:Re:Re:Re:SQLState 22000, Exception: |
HXTT Support |
2006-08-24 06:55:32 |
>BTW: I use this Driver with RMI.HXTT Access supports RMIServer mode, but it's slower. HXTT Access uses always quicker TCPserver mode for remote access.
> If a table has a DATE Column, this column is >not serializable over RMI.
>On the client, i get an exception: Class not found: com.hxtt.global.q But if i add the JAR to the CLIENT Classpath (the SERVER does all the DB work) it works perfectly.
>Using other JDBC Drivers (Oracle, DB2, SQL Server,..) it is not necessary to add the JDBC Jars into the CLIENT-Classpath.
You can use Access_Remote_Access_JDBC30.jar at client side when Access_JDBC.jar is using at server side. You need to use Access_Remote_Access_JDBC30.jar and Access_JDBC.jar which are compiled at the same date.
|