You should read a book or tutorial on JDBC. When you retrieve a resultset in its initial state, the cursor is positioned before the first row. You need to use ResultSet.first() or ResultSet.next(), and check the return value to see whether you're actually on a valid record.
Jim > -----Original Message----- > From: digi_pixel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 05, 2007 11:13 AM > To: [email protected] > Subject: Re: SqlException With Returning Data For First Row > > > By the way I was trying to retrieve the column using index 0. I have > attempted to re run the application by changing the index to 1 this time, > however a new run time error now appears: > > org.apache.derby.client.am.SqlException: Invalid operation to read at > current cursor position. > > > Rick Hillegas-2 wrote: > > > > Without seeing your code, I can only speculate about what the problem > > is. However, your problem may be that you are trying to retrieve the > > first column using the index 0. Annoyingly, the JDBC methods use > > 1-based, not 0-based indexing. So the first thing to verify is that you > > are retrieving the initial column using index 1, not 0. > > > > Hope this helps, > > -Rick > > > > > > -- > View this message in context: http://www.nabble.com/SqlException-With- > Returning-Data-For-First-Row-tf4952206.html#a14180728 > Sent from the Apache Derby Users mailing list archive at Nabble.com. >
