🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.databases
Article #47

Re: "INVALID HANDLE"- Connection is getting finalized

#47
From: Gerard Koppelaar
Date: Thu, 23 Oct 1997 00:00
59 lines
2257 bytes
About the mentioned problem,
(
resultSet.next() throwing "INVALID HANDLE" at random places
during a loop which gets all records/columns from a resultSet:
)

I think I've found the cause of it
(STILL NEED A SOLUTION :(   )


Here's a dump of the DriverManager.setLogStream(System.out):



> (I'm getting data for column 7 here)
Get string data (SQLGetData), hStmt=44697724, column=7, maxLen=31
NULL

> (I'm getting data for column 8 here)
Get string data (SQLGetData), hStmt=44697724, column=8, maxLen=6
HR

> (This is where it goes wrong: my Connection gets finalized WITHOUT ANY REASON:)
Connection.finalize sun.jdbc.odbc.JdbcOdbcConnection@1cd449
*Connection.close
0 Statement(s) to close
ResultSet.finalize sun.jdbc.odbc.JdbcOdbcResultSet@1cd52c
Connection.finalize sun.jdbc.odbc.JdbcOdbcConnection@1cd8cc
*Connection.close
0 Statement(s) to close
ResultSet.finalize sun.jdbc.odbc.JdbcOdbcResultSet@1cd982
ResultSet.finalize sun.jdbc.odbc.JdbcOdbcResultSet@1cdbde

> (Here my program continues to get data from column 9, which does not work because
   the connection has been closed)
Get string data (SQLGetData), hStmt=44697724, column=9, maxLen=11
24/04/20


HELPHELPHELPHELPHELPHELP

This seems like a MAJOR MAJOR bug (or I'm doing something completely
wrong here,
but I've been looking at my ten lines of code for 2 days now and it
looks fine to me)!

Keeping other references to the connection does NOT NOT NOT prevent it
from being
finalized!!!

Anybody with the same problem?
Is this a bug, a feature (a connection timeout, for example) or my
mistake?
Any help is very much appreciated!


Gerard Koppelaar
gkoppelaar@aida.nl
Technical Details
Message-ID: <344F54EB.857E63FC@aida.nl>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <344CA8E2.3546162F@aida.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1073da,ecb121f56243e80b,start
X-Google-Attributes: gid1073da,public
X-Google-Thread: 107d46,ffc159e53fb8c61a
X-Google-Attributes: gid107d46,public
From: Gerard Koppelaar <gkoppelaar@aida.nl>
Subject: Re: "INVALID HANDLE"- Connection is getting finalized
Date: 1997/10/23
Message-ID: <344F54EB.857E63FC@aida.nl>
X-Deja-AN: 282625122
References: <344CA8E2.3546162F@aida.nl>
Reply-To: gkoppelaar@aida.nl
Organization: AiDA
Newsgroups: comp.lang.java.databases,borland.public.jbuilder.database