|
thanx for all the replies. that's what i like on this list: all people are trying to help each other. very noble. thanx again. -----Ursprüngliche Nachricht----- Von: Ducret, Gilles (CH) [mailto:Gilles.DUCRET@lloydsbank.ch] Gesendet: Freitag, 14. Juni 2002 08:57 An: 'java400-l@midrange.com' Betreff: RE: error accessing database from servlet This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. -- [ Picked text/plain from multipart/alternative ] The walk through a select result is different from a resultset You must first go to the first element of the set. The first is in position 1, while by default the set is at position 0. Then you must use setCurrentRow to walk through the set. Look at the following piece of code: try { int i = 0; while (++i <= result.getNumRowsInCache()) { result.setCurrentRow(i); String potName = (String) result.getColumnValue("PotName"); Double potBalance = (Double) result.getColumnValue("PotBalance"); } } catch(com.ibm.db.DataException e) { } Always make sure to close the result once read, and release the connection to the pool. (use finally clause) Gilles -----Original Message----- From: Clapham, Paul [mailto:pclapham@core-mark.com] Sent: jeudi, 13. juin 2002 17:43 To: java400-l@midrange.com Subject: RE: error accessing database from servlet You will get "cursor not valid" if you try to use (e.g.) rs.getString() before the first call to rs.next(). The stack trace you get should point directly at the line of code that is causing the error, so look there first. PC2 -----Original Message----- From: Mihael Knezevic [mailto:m.knezevic@porta.de] Sent: June 13, 2002 08:38 To: java400-l@midrange.com Subject: AW: error accessing database from servlet ok. did that. it uses the . to separate the lib from the file. but i get a cursor not valid error. what could possibly be wrong? what does the error mean? _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l or email: JAVA400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l. ********************************************************************** This E-mail and any files transmitted with it are confidential and intended for the exclusive use of the addressee(s) only. You should not disclose its contents to any other person. If you are not the intended recipient please notify the sender immediately. ********************************************************************** _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l or email: JAVA400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.