cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: SQL taglib
Date Tue, 11 Apr 2000 17:26:26 GMT
On Tue, 11 Apr 2000, Yann wrote:

> > Hmm...
> > I'm not sure about this, but doesn't executeQuery work only for statements
> > which
> > generate a ResultSet?
> > Whereas a simple update-statement (for example) surely doesn't generate a
> > resultset
> > and would be executed with st.execute(...)
> > Perhaps one could add a variable which tells the SQL taglib if it should
> > just
> > execute
> > or
> > executeQuery and render the ResultSet
> 
> I just created an XSP page that updates an Access database. The update works
> yet you get an SQLException "No ResultSet was produced". Since it does a
> job, it would be nice to have a way to not throw that exception. Here is the
> code:

yes, you're right. perhaps the top-level element should be execute-update
to indicate that this should happen? or should we set an element child
instead?

> May be there is some sql tag to use to make it a non returning resultsets
> query. Ideally, I would want to assume that if no exception occured I can
> output something like "Record inserted". How can I sort of "catch" the
> potential SQLExceptions in XSP?

try {} catch (SQLException e) {} is all i can think that you'd do... I've
been actually wondering what the best way to accomodate this is myself.
seems like XSP could have some convenient exception handling routines
built-in, but what would they be?

- donald


Mime
View raw message