Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9312887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:44:33+00:00 2026-06-19T01:44:33+00:00

Overview: Need to read row from Oracle view and create a Notes document, save

  • 0

Overview: Need to read row from Oracle view and create a Notes document, save document, then write Document Unique ID back to Oracle.

I am able to read connect and read data no problem. I am using a type 4 connection connecting to an Oracle 11 database. The Oracle view is setup to allow Updating. The view has nothing in it that is outline here: In Oracle, is it possible to INSERT or UPDATE a record through a view?

*With the same username and password, you are able to successfully update view by typing in SQL statement.

*Tried using conn.setAutoCommit(false); This had no effect.

*Verified that the result set was updatable (1008)

*User has been given full DBA access (temporarily)

*I have tried every possible combination of the first parameter in the createStatement method

...
Statement statement = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
ResultSet rs = statement.executeQuery(fetch);
...
String UNID = doc.getUniversalID(); //gets unique id from saved Notes Document  
System.out.println("This is what to write to Oracle:" + UNID);
System.out.println("is updatable=1008, not updatable=1007 value is:" + rs.getConcurrency());
System.out.println("is Result Set Closed:" + rs.isClosed());

rs.updateString("NOTES_DOC_ID", UNID);
System.out.println("got past updating NOTES_DOC_ID column");
rs.updateRow();  //fails here

Here is the error from console:

This is what to write to Oracle:BF8091259610C61B87257B16005C14FB

is updatable=1008, not updatable=1007 value is:1008

is Result Set Closed:false

got past updating NOTES_DOC_ID column

java.security.AccessControlException: Access denied (java.lang.RuntimePermission exitVM.0)

Prior to asking for the user to have DBA access I would get a

java.sql.SQLSyntaxErrorException: ORA-01031: insufficient privileges

I think this a big clue. My DBA doesn’t know what further access to give me.

The DBA is wanting me to start using ref cursors, which is fine, but I suspect there is some kind of security setting for JDBC access that is tripping me up, and I want to explore that first. If there is a security issue, then I don’t think changing the way I read the rows is going to make a difference. Most of all the documentation on how to do this was obtained from Oracle’s website, as well as this site.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T01:44:34+00:00Added an answer on June 19, 2026 at 1:44 am

    I am going to answer my question and explain how I got past this roadblock. In the end, I basically did what ‘a_horse_with_no_name’ suggested.

    Instead of using the resultSet cursor or a ref cursor to perform the update, I was able to use a plain UPDATE statement. This was possible, because I was able to convince the DBA to create a column for a unique identifier. We could never get around the exceptions caused by the updateRow() method of the resultSet. Prior to him adding the unique identifier, there was not a key in which to reliably use the UPDATE statement.

    Here is the code where updateSQL is a string holding the update SQL statement:

    updateResultInt = updateStatement.executeUpdate(updateSQL);
    

    It returns a 1 if successful.

    One word of caution, if you are using a tools like TOra or sql plus to check your update statements, you have to remember to manually commit them. If you don’t your java agent will hang when trying to run it. Here is an good reference that helped me with that issue: SQL Update hangs Java program

    Thanks to those who commented!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for an overview of algorithms, you need every now and then. If
Overview I am using CompositeWPF to create an app using C#. This really should
Overview: Trying to write a trigger for a SQL Server 2008 database. TableA and
Please read here and here to get a quick overview of my problem and
This one has stumped me. A quick overview I need to be able to
I need an overview of the iOS architecture (Process management, system memory management, kernel)
I've read the Instances Overview for GAE and it is very informative, however when
Simple problem, actually. I need an overview of Unicode/HTML Character entity code for all
i read this overview of the StoreKit API but could not understand the role
I have been looking for good newbie-advice on how to efficiently read data from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.