craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > JDBC/Database Issues Post New Topic   Post A Reply
How to close database after data is loaded printer friendly version
next newest post | next oldest post
Author Messages
malvarado{@}classalinfo.com
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

Dear Benjamin:
Hi:

I am starting to test "QuickTable".
One of the requirement of my applications is to be
able
to close the database connection once that I have
load the database
data into the QuickTable.

could I accomplish this by using the close().
method.
In the "JTable" I would use the disconnect method.
Are they similar?

We are looking forward to see management to give the
thump up to the use of
your smart component!!!

Regards
Marlon Alvarado
admin{@}quicktable.org
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

Marlon,

This is possible. You have to do the following things.

1) Since QuickTable, fetches the records as the
user scrolls down, before you close the connection ,
you have to trigger the fetch of all records.

yourQuickTable.refresh();
//after refresh add the following
JTable jt = yourQuicktable.getTable();
TableModel dbTableModel = jt.getModel();
int row = dbTableModel.getRowCount()-1;
jt.getValueAt(row,1);
//close the connection
yourQuickTable.close();

2) don't assign any insert/delete/update statements

3) even after you do the above things, if you still
get error like, "connection already closed", then ,
add a dbtableErrorlistener and catch all the errors.

yourQuickTable.addDBTableErrorListener(DBTableErrorListener
yourListener)

4) If you don't want users to edit the data, then for all the columns set the ReadOnly property to true.


I feel this should make it work.

Ben

malvarado{@}classalinfo.com
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

Thanks Benjamin, It worked!!! This QuickTable is awesome!!. We will be buying it in the next week or so. Regards Marlon.
Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios