Re: select into outfile via mysql-connector-3.0.10 throws Exception
Posted by: Mark Matthews
Date: April 26, 2005 10:27AM

tkettenb wrote:
> While doing a "SELECT * FROM TABLE INTO OUTFILE
> '/tmp/file' " the mysql JDBC connector throws an
> Exception with ErrorCode = 0 and Message="Can not
> issue INSERT/UPDATE/DELETE with executeQuery()"
>
> I am going to ignore this exception, since the
> statement gets executed and the data is available
> in the given file. But this can't be the proper
> way to handle this.
>
> Any ideas?

Tkettenb,

The server is returning metadata that makes the driver think you've executed a DDL statement (even though it uses 'SELECT' in the query). The JDBC spec requires that an exception is thrown in this case.

The correct way to execute DDL statements is to use either executeUpdate() or execute().

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject
Written By
Posted
Re: select into outfile via mysql-connector-3.0.10 throws Exception
April 26, 2005 10:27AM


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.