Problems with execute query with JDBC
I've written an JDBC interface.
Works fine when i read data from the mysql database.
But when I want to write something I got this error message:
"java.sql.SQLException: Can not issue data manipulation statements with executeQuery()"
here is the javasnippte with which I've tried this:
......
try{
resultSet = statement.executeQuery(query);
}catch (SQLException ex){
switch(ex.getErrorCode()){
case 1062:SystemMessage.print("Dataset already exists",
"JDBCAdapter.writeSqlStatement");
ErrorCode = 2;
break;
default:SystemMessage.print("Error/Warning during execution"+
"\r\n ErrorCode: " +
String.valueOf(ex.getErrorCode()) +
"\r\n ErrorMessage: " +
ex.toString(),
"JDBCAdapter.writeSqlStatement");
ErrorCode = -1;
}
}
.....
This snippet had worked 2 years ago ... now I wanted to program new things.. but what should i program when even the old snippet are not working.
I thought of an error with the login permission ... but this can't be the problem because I'm able to read ... and I set all the parameter of the user to 'Y'
Has anyone a suggestion?
I got stuck because of this problem.
Subject
Written By
Posted
Problems with execute query with JDBC
July 26, 2004 07:00AM
November 15, 2004 03:35PM
December 01, 2004 09:52AM
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.