Skip to Content.
Sympa Menu

freetds - Re: JDBC-Gurus, please comment

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Bob Kline <bkline AT rksystems.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: JDBC-Gurus, please comment
  • Date: Fri, 14 Sep 2001 12:47:35 -0400 (EDT)


On Fri, 14 Sep 2001, "Schörk, Andreas" wrote:

> My big question is, what should executeQuery do: should it search
> for the first ResultSet or fail, if the first statement is a not
> result generating statement ??

Again, the JDBC docs are not as unambiguously clear as they could be.
The printed docs are better than the online documentation, though. In
the printed version, Sun says "PARAMETERS: sql typically an SQL SELECT
statement. It must produce one ResultSet object only. .... THROWS:
SQLException if an error occurs in processing the SQL query or if the
specified argument is a statement that generates a row count instead of
a result set."

If it had said " ... or if the specified argument is a statement that
generates no result or any result except a single result set" you would
have had no room for doubt. My guess is that you should throw an
exception in the situation you describe.

--
Bob Kline
mailto:bkline AT rksystems.com
http://www.rksystems.com





Archive powered by MHonArc 2.6.24.

Top of Page