Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 72773 invoked from network); 20 Oct 2009 19:06:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Oct 2009 19:06:04 -0000 Received: (qmail 23169 invoked by uid 500); 20 Oct 2009 19:05:58 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 23137 invoked by uid 500); 20 Oct 2009 19:05:58 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 23126 invoked by uid 99); 20 Oct 2009 19:05:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Oct 2009 19:05:58 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of pid@pidster.com does not designate 209.85.219.207 as permitted sender) Received: from [209.85.219.207] (HELO mail-ew0-f207.google.com) (209.85.219.207) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Oct 2009 19:05:48 +0000 Received: by ewy3 with SMTP id 3so5344351ewy.41 for ; Tue, 20 Oct 2009 12:05:27 -0700 (PDT) Received: by 10.216.87.67 with SMTP id x45mr2499708wee.18.1256065527642; Tue, 20 Oct 2009 12:05:27 -0700 (PDT) Received: from phoenix.config (78-86-122-68.zone2.bethere.co.uk [78.86.122.68]) by mx.google.com with ESMTPS id f13sm1365391gvd.6.2009.10.20.12.05.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 20 Oct 2009 12:05:26 -0700 (PDT) Message-ID: <4ADE09F4.1040604@pidster.com> Date: Tue, 20 Oct 2009 20:05:24 +0100 From: Pid Reply-To: pid@pidster.com Organization: Pidster Inc User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.1.1) Gecko/20090715 Thunderbird/3.0b3 MIME-Version: 1.0 To: users@tomcat.apache.org Subject: Hijacking References: <4AD615CD.1050005@gmail.com> <7F6C9CDB5F2B4A899CE138E7A599810F@ULS.local> <2EBD3A6DB153412E82DCA50572CC5379@ULS.local> <64F54A44118D434692C2B69545455DDE@ULS.local> <4ADDA8FB.3080608@pidster.com> <80F5E131F914461697357A3730A40846@ULS.local> In-Reply-To: <80F5E131F914461697357A3730A40846@ULS.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 20/10/2009 19:02, ULS Tech Support wrote: > Tell me how i hijacked my own thread? As I described. See? > This is my own thread.. and i actually modified the last one i sent out, > cleared everything and typed out brand new. Umm, yes, that would be what we call hijacking. You hijacked a thread, then did it again to 'your' new thread. Unless I'm much mistaken you responded to the inestimable Bill Davidson's first "DBCP woes (running out of cursors)" email. Just because you changed the subject and/or body, doesn't mean you started a new thread. Look at the mail headers, or use a mail reader that supports threaded views to see it. p > Thanks for the help. > > > > -------------------------------------------------- > From: "Pid" > Sent: Tuesday, October 20, 2009 6:11 AM > To: > Subject: Re: Another issue, jTDS with Tomcat 5.5.9 > >> On 16/10/2009 22:04, ULS Tech Support wrote: >>> Hi there, >> >> Please start a completely new email for each thread. Replacing the >> subject line doesn't count, it's called thread hijacking. >> >> p >> >> >>> Tomcat 5.5.9, using jTDS, with SQL Server 2005 i am getting this issue. >>> >>> 2009/10/16 10:47:15 - sql exception:java.sql.SQLException: No current >>> row in the ResultSet. >>> >>> This issue doesn't happen with TWFreeTDS (in fact, when i switch to >>> twfreetds it works fine).. but from my research so far, i may have been >>> wrong in the way i implemented it. >>> >>> Here is the code. >>> >>> public Vector queryPaged4(String strTableExt) throws SQLException { >>> dbRecords.removeAllElements(); >>> boolean rc = true; >>> >>> ResultSet rs_info = null; >>> boolean bTest = false; >>> DBItems temp = null; >>> >>> //New ********** >>> /* This will call a stored procedure, pass in the page # and >>> number to display on each page and will return the results >>> directly. >>> */ >>> >>> CallableStatement call = dbConn.prepareCall("{call sp_PagedItems4 >>> (?,?,?,?,?)}"); >>> call.setString(1, strTableExt); >>> call.setString(2, filter); >>> call.setString(3, order); >>> call.setInt(4, pageNumber); >>> call.setInt(5, recsPerPage); >>> >>> if (!call.execute())//Query >>> { >>> //No ResultSets Returned; >>> } else { >>> >>> try { >>> rs_info = call.getResultSet(); >>> >>> //Save the total number of records (value) in queryPagedRecords >>> queryPagedRecords = rs_info.getInt("TotalRec"); >>> queryPagedMore = rs_info.getInt("MoreRecords"); >>> nLowestID = rs_info.getInt("FirstRec"); >>> nHighestID = rs_info.getInt("LastRec"); >>> >>> if (queryPagedRecords > 0) { >>> //Test for another resultset. >>> boolean bTest = false; >>> bTest = call.getMoreResults(); >>> //Next resultset established, let's get the data! >>> dbResultSet = call.getResultSet(); >>> >>> while (dbResultSet.next()) { >>> //System.out.println("2: " + dbResultSet.getInt("ID")); >>> rc = true; >>> >>> //Set the items object based on the resultset. >>> temp = this.setItemsObject(true, dbResultSet); >>> >>> dbRecords.addElement(temp); >>> } >>> } >>> } catch (SQLException e) { >>> System.out.println("SQLException: " + e); >>> System.out.println("SQLException Message: " + e.getMessage()); >>> } finally { >>> rs_info = null; >>> temp = null; >>> dbResultSet = null; >>> } >>> System.out.println("end"); >>> } >>> >>> return dbRecords; >>> } >>> >>> Basically i'm getting the resultsets, but i'm not able to pull the data >>> from the resultsets as i get the error when i try and getInt. >>> >>> Does anyone have any clue on why this is happening, or how i can make >>> this work? >>> >>> I did try and modify the code to the following to see if it helped, but >>> again, i'm still stumped on HOW to retrieve the data from the >>> resultsets. >>> >>> try { >>> System.out.println("start..."); >>> int updateCount = 0; >>> updateCount = call.getUpdateCount(); >>> System.out.println("update count = " + updateCount); >>> boolean moreResults = true; >>> while (updateCount >= 0 || moreResults) { >>> if (!moreResults) { >>> // just eat it >>> updateCount = call.getUpdateCount(); >>> System.out.println("\nupdateCount= " + updateCount); >>> } else { >>> // get the data >>> if (rs_info == null) { >>> rs_info = call.getResultSet(); >>> } else { >>> dbResultSet = call.getResultSet(); >>> } >>> >>> //Save the total number of records (value) in queryPagedRecords >>> System.out.println("Got Data, how to process??"); >>> } // if ! moreResults else >>> moreResults = call.getMoreResults(); >>> System.out.println("More Results??"); >>> } // while >>> >>> //rs_info.setFetchSize(); >>> System.out.println("Lets get data from rs_info"); >>> queryPagedRecords = rs_info.getInt("TotalRec"); >>> queryPagedMore = rs_info.getInt("MoreRecords"); >>> nLowestID = rs_info.getInt("FirstRec"); >>> nHighestID = rs_info.getInt("LastRec"); >>> >>> But it stops at the "queryPagedRecords = rs_info.getInt("TotalRec");" >>> >>> Thanks in advance to anyone who can help. >>> >>> ...Robin >>> >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>> For additional commands, e-mail: users-help@tomcat.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org