Re: [OT] a Collection of beans to store sql data

2007-01-11 Thread Christopher Schultz
-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 usually don't

a Collection of beans to store sql data

2007-01-10 Thread Michael Ni
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

Re: [OT] a Collection of beans to store sql data

2007-01-10 Thread Christopher Schultz
-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;

Re: [OT] a Collection of beans to store sql data

2007-01-10 Thread Michael Ni
@tomcat.apache.org Subject: Re: [OT] 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( String

Re: [OT] a Collection of beans to store sql data

2007-01-10 Thread Len Popp
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

Re: [OT] a Collection of beans to store sql data

2007-01-10 Thread Michael Ni
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 users@tomcat.apache.org To: Tomcat Users List users@tomcat.apache.org Subject: Re: [OT] a Collection of beans to store sql data Date: Wed, 10