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
Database tables opened mulitple times? printer friendly version
next newest post | next oldest post
Author Messages
JustinSkalka
Private First Class

Gender: Unspecified
Location: USA
Registered: Feb 2006
Status: Offline
Posts: 18

Click here to see the profile for JustinSkalka Send email to JustinSkalka Send private message to JustinSkalka Find more posts by JustinSkalka Edit or delete this message Reply w/Quote
Posted Thursday, March 13, 2008 @ 18:08:08  

We're using DBTable via JDBC to an OS/400 DB2/UDB environment. We've found that every time we issue a dbtable.refresh() it re opens the database files.

For example:
sql = "SELECT a,b,c from File1"

initial load console shows:
File1 open cursor at record 1

first refresh console shows:
File1 open cursor at record 1
File1 open cursor at record 1

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Sunday, March 16, 2008 @ 21:28:14  

Please refer the api, refresh will re-execute the query and get the latest data.

what are you expecting on refresh?

JustinSkalka
Private First Class

Gender: Unspecified
Location: USA
Registered: Feb 2006
Status: Offline
Posts: 18

Click here to see the profile for JustinSkalka Send email to JustinSkalka Send private message to JustinSkalka Find more posts by JustinSkalka Edit or delete this message Reply w/Quote
Posted Monday, March 17, 2008 @ 09:25:42  

I do use the dbtable.refresh() from the api to get the latest data, but each time it opens the file again. My guess is that once the API retrieves the data and populates the table, it does not release the result set. One of our customers leaves our application open for extended periods of time, and on a single connection to the database, it had over 6,000 open links to the same file - each new link occurring on a refresh. We've traced through our code and keep ending up at the API.
JustinSkalka
Private First Class

Gender: Unspecified
Location: USA
Registered: Feb 2006
Status: Offline
Posts: 18

Click here to see the profile for JustinSkalka Send email to JustinSkalka Send private message to JustinSkalka Find more posts by JustinSkalka Edit or delete this message Reply w/Quote
Posted Friday, March 21, 2008 @ 16:23:14  

Bueller?
Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Monday, March 24, 2008 @ 20:50:38  

We close the resultset everytime, before we reexecute the query. which JDBC driver are you using? check the jdbc driver whether there are any issues. If you have the source code I can give you the line number where the result set is closed.

One way you can debug this is to execute the query yourself and then pass the resultset to quicktable using refresh(resultset). whenever you want to refresh close the resultset and execute the query again and pass the resultset. Check whether the files are open in this approach.

JustinSkalka
Private First Class

Gender: Unspecified
Location: USA
Registered: Feb 2006
Status: Offline
Posts: 18

Click here to see the profile for JustinSkalka Send email to JustinSkalka Send private message to JustinSkalka Find more posts by JustinSkalka Edit or delete this message Reply w/Quote
Posted Wednesday, March 26, 2008 @ 08:59:19  

Thanks.

Will try that.

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