[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Jeanne Boyarsky wrote:Something is wrong with that given the code is complaining about the cursor position. I recommend adding some debug statements to see what the row # is when it is failing. And compare that to how many rows there really are.
Also check your connection settings. I think you need to be in SCROLL_SENSITIVE mode to make updates this way.
Antony Amicone wrote:heeeeeeeeeeeeelp
Paul Clapham wrote:
Antony Amicone wrote:heeeeeeeeeeeeelp
You don't seem to be able to distinguish between databases and things on your screen, as far as I can see. If you are
having beginner trouble updating a database -- and that is your problem -- then having a complex GUI just gets
in the way. Especially if you are also having problems with the GUI.
So put all of that aside and write a simple command-line program which reads a ResultSet and then tries to update
various parts of it. Nothing more than that. When you have working code, then you can consider integrating that
working code into a more complex program.
Basic rule: Just test one thing at a time.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Antony Amicone wrote:on my cell in the table it come a value like [B@341j0j ( that changes random even if i just put in tray icon and re open )
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Paul Clapham wrote:Well, I hate to tell you this, but the only time I ever tried to update a ResultSet in that way, I was using MS Access and the JDBC-ODBC driver, and it just crashed. So I gave up and switched to a proper database with a JDBC driver. I also switched to using SQL UPDATE statements rather than trying to update ResultSets.
So it may be possible that you are doing everything right, but running into bugs in those other things. Or (more likely) you are doing something wrong, but I can't tell what it is. Personally I would recommend not doing what you are trying to do there.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |