Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

java.sql.SQLException: ResultSet is from UPDATE. No Data.

Hello,

I'm new to Java and I have a problem. I need to export some fields from a MySQL DB to a .csv file. I'm using executeQuery(SELECT...INTO FILE...) and I get this exception:

java.sql.SQLException: ResultSet is from UPDATE. No Data.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1072)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:986)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:981)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
at com.mysql.jdbc.ResultSetImpl.next(ResultSetImpl.java:7158)
at Cell_Monitor.mySqlDB.operationData(mySqlDB.java:110)
at Cell_Monitor.Start.main(Start.java:52)

After I "googled", I understood that it could be a bug or something, but still I don't know how to fix the problem and export the fields. Can u help?10x

Your rating: None

posible cause

first, could be good you post the script you use. Second, that error seems to be a no data found exception (database error).

Problem solved. Thanks for

Problem solved.
Thanks for your answer.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <p> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <br /> <br> <strike>
  • Lines and paragraphs break automatically.
  • Use <!--pagebreak--> to create page breaks.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
Just checking to see if you're an actual person rather than a spammer. Sorry for the inconvenience.