I want to retrieve a set of records from a database, do a rs.next() and then assign the result of this to a variable to pass to a method that will use this record, in the same way that I would without assigning it to a variable and passing it to a method is there any way to do this? I’m using JAVA (1.5)
Thank you for all the answers
I do not want to pass the whole resultSet to a method, only the current row, but as I understand, it is not possible to do this
You want to assign the result of rs.next() to a variable?
I’m afraid you cannot do that. You can have a reference from that rs and process it in other method ( the same way you would without assign it to a var )
When you pass the rs as an argument to a method that is exactly what you’re doing already.
Did I get right your question?