-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Bob,
Bob Hall wrote:
> You missed the essence of Chris's suggestion:
>
> "3. Throw an exception in your catch(SQLException) block."
>
> In other words, your catch block would "swallow" the SQLException
> should one occur.
Just to be clear, I usuall
rn statement in the catch{} block.
-Bob
- Original Message
From: Michael Ni <[EMAIL PROTECTED]>
To: users@tomcat.apache.org
Sent: Wednesday, January 10, 2007 10:15:51 PM
Subject: Re: [OT] a Collection of beans to store sql data
hmmm there is a sqlexception in my catch block, u
hmmm there is a sqlexception in my catch block, unless i'm doing it wrong.
mike
From: Christopher Schultz <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List"
To: Tomcat Users List
Subject: Re: [OT] a Collection of beans to store sql data
Date: Wed, 10 Jan 2007 21:15:50
On 1/10/07, Michael Ni <[EMAIL PROTECTED]> wrote:
thanks for the quick reply, by the way everyone is telling me to make my
functions return objects instead of resultset. why is returning resultset
bad?
Because of this line:
try {if (rs != null) rs.close();} catch (SQLException e) {}
Your
a Collection of beans to store sql data
Date: Wed, 10 Jan 2007 21:15:50 -0500
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael,
Michael Ni wrote:
> My problem is i get
>
> PersonNew.java:48: missing return statement
> }
[snip]
> public Collection getPersondata
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael,
Michael Ni wrote:
> My problem is i get
>
> PersonNew.java:48: missing return statement
> }
[snip]
> public Collection getPersondata( String alias, String password ) {
>
>Connection conn = null;
>PreparedStatement stmt = null;
>
I was wondering if anyone could help with this. As recommended by forum
members, I am using a Collection of beans to store the data from sql query.
My problem is i get
PersonNew.java:48: missing return statement
}
^
I found some information on the subject on
http://forum.java.sun.com/threa