File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes updateRow() throws Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "updateRow() throws " ORA-00907: missing right parenthesis"" Watch "updateRow() throws " ORA-00907: missing right parenthesis"" New topic
Author

updateRow() throws " ORA-00907: missing right parenthesis"

Terry Luedtke
Greenhorn

Joined: Dec 11, 2002
Posts: 3
Hi,
I'm trying to use an updateable record set, however whenever I update a row, I get the error " ORA-00907: missing right parenthesis". The query I use to get the record set is fine as I can extract the selected values. I just can't call updateRow(). Has anyone come across this? My code is:

Baffled,
Terry Luedtke
Kevin Mukhar
Ranch Hand

Joined: Nov 28, 2000
Posts: 83


Very strange message indeed. The error message appears to have nothing to do with (what I think is) the problem. According to Oracles documentation ( http://download-west.oracle.com/docs/cd/A97630_01/java.920/a96654/resltset.htm#101813, scroll down to "FOR UPDATE Clause Limitation in an Updatable Result Set"), you can't use a FOR UPDATE clause with an updatable result set. The documentation also lists some other limitations, but I don't think you are violating any of them.
[ December 12, 2002: Message edited by: Kevin Mukhar ]
Terry Luedtke
Greenhorn

Joined: Dec 11, 2002
Posts: 3
Thanks Kevin,
Removing the "For Update" fixed it. I'm learning to take Oracle errors with a grain of salt. When I was working with Perl's DBD library (a wrapper around Oracle's OCI drivers), I got an error stating: "You must install a Solaris patch to run this version of the Java runtime". The real problem was that I'd forgotten to add the Oracle library path to LD_LIBRARY_PATH. How that relates to a Java runtime, I have no idea.
Thanks,
Terry
 
Don't get me started about those stupid light bulbs.
 
subject: updateRow() throws " ORA-00907: missing right parenthesis"