rs.close, isn't it?
-----Original Message-----
From: Mick Sullivan [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 12:49 PM
To: [EMAIL PROTECTED]
Subject: Closing ResultSet and Statement?
Hi
Does anyone know how to close a ResultSet?
Heres my code:
public String getName() throws Exception {
Statement statement = connection.createStatement();
int myInt = 1;
ResultSet rs = statement.executeQuery("SELECT Name"+
" FROM nameAddress" +
" WHERE ID = ("+
myInt + ")");
rs.next();
String myString = rs.getString("Name");
//change the resultSet to a string
//so it can be used by the jsp page
return myString;
}
Any help at all would be much appreciated
Thanks in advance,
Mick
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.