Re: Problems with execute query with JDBC
Posted by: Mark Matthews
Date: December 01, 2004 04:13PM

Statement.executeQuery() is for SQL that returns result sets (i.e. 'SELECT')...Statement.executeUpdate() is for DDL (i.e. 'INSERT', 'UPDATE', 'DELETE'), Statement.execute() is if you don't know what the query is.

The JDBC spec has _always_ been this way, however the JDBC driver didn't enforce this before 2 years ago....Around 2 years ago we started enforcing it, as it's required for JDBC compliance (and it's tested for in the JDBC compliance testsuite from SUN).

Options: ReplyQuote


Subject
Written By
Posted
Re: Problems with execute query with JDBC
December 01, 2004 04:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.