This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I am summarizing a MySQL database.
I have a table called Race with 245 columnes and 20,000+ rows.
I am adding up the data in the columns and trying to insert that into another table called Race_summary which will have all the same columns but only 1 row.
I am attempting to do this somewhat generically so I can reuse the code at a later time (and I have 2 other databases to summarize).
here is the code I am using:
the println line is printing the values to the screen and showing the correct values, however when I check the table after running the program the values are not getting updated.
Can you print the string updateSummary , and show us what it says?
executeUpdate() returns the number of rows that are updated by your updateSummary. Can you print and show us this value?
Try if commit after the update helps.