I\'m using JDBC for very simple database connectivity.
I have created my connection/statement and executed a query. I check the query object of the statement in the
In the past I had similar issues in code such as this:
querystr = "your sql select query string"
resultset = statement.executeQuery(querystr)
while (resultset.next())
{
//do something with the data.
//if you do something fairly involved in this block (sequentially, in the same thread)
//such as calling a function that acts on the data returned from the resultset etc.
//it causes the resultset fetch to wait long enough for resultset.next() to
//unexpectedly return null in the middle of everything
}
What I did in this situation was to load up all data into a local memory data structure with minimum wait on resultset.next(). Then I did whatever I had to on the data from the local data structure after gracefully closing resultset. This behavior was with Oracle 10 on Unix backend/JDK 1.6.0_22 client under Windows XP.
Hope this helps.