Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  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 ACCESS
Scrolling cursor support?
Timo
2006-09-20 07:02:41
Hello everybody,

we have a problem using your Access JDBC driver:

Class.forName("com.hxtt.sql.access.AccessDriver");
String url = "jdbc:access:/DRIVE:/PATH/FILE.mdb";
String user = "sa";
String password = "";
Connection con = DriverManager.getConnection(url, user, password);
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);

[...]

ResultSet rs = getResultSet();
rs.absolute(r + 1); //ERROR OCCURS HERE
return rs.getObject(c + 1);

------------------------
ERROR MESSAGE:
java.sql.SQLException: Please move the cursor to a data row first!
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.sql.cu.new(Unknown Source)
at com.hxtt.sql.cu.getString(Unknown Source)
at com.hxtt.sql.cu.getObject(Unknown Source)
[my class where the error occurs]

Any idea?

Regards,
Timo
Re:Scrolling cursor support?
HXTT Support
2006-09-20 07:14:01
>Scrolling cursor support?
Support.

>ResultSet rs = getResultSet();
>rs.absolute(r + 1); //ERROR OCCURS HERE
>return rs.getObject(c + 1);
You should use
if(rs.absolute(r + 1)){
return rs.getObject(c + 1);
}else{
//.... do your other operation. Now you're here
}

Re:Re:Scrolling cursor support?
Timo
2006-09-21 01:39:06
Thanks for your response!

Doesn't work. The table has round about 40.000 entries, but the record occurs not on every record.
I use my own TableModel and the methods rs.absolute() and rs.getObject() are called in the getValueAt(int r, int c) (in the TableModel) by the JTable. I have tested your code, it didn't help.
What else can I do?

Sincerly yours,
Timo
Re:Re:Re:Scrolling cursor support?
HXTT Support
2006-09-21 22:42:47
>What else can I do?
Recurred and supported. Please download the latest package.
Re:Re:Re:Re:Scrolling cursor support?
Timo
2006-09-22 05:41:59
Thanks! I've downloaded the latest packages and tested it on a MDB file with 42.000 records and round about 25 columns. It works now, but the performance is horrible slow :-( Scrolling in the JTable from the first record downwards takes about 1 minute...

Regards,
Timo
Re:Re:Re:Re:Re:Scrolling cursor support?
HXTT Support
2006-09-22 05:54:42
We will try to quicker it soon.
Re:Re:Re:Re:Re:Re:Scrolling cursor support?
HXTT Support
2006-09-22 07:42:41
BTW, if you use ResultSet.setFetchSize(60000), you will find it become quicker.

Because MDB isn't record oriented, absolute need to do some caluculation so that it's slower to use absolute method. We will try to complement cache code to quicker it.
Re:Re:Re:Re:Re:Re:Re:Scrolling cursor support?
HXTT Support
2006-09-24 00:29:39
>Scrolling in the JTable from the first record downwards takes about 1 minute...
Please download the latest package, which have quicken that ResultSet.absolute function.

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