ERROR MESSAGE - Ivalid operation for forward only resultset : first 17075

Hi, all, I'm using Jdbc Drive Oracle JDBC driver 8.1.7.0.0 and weblogic. However, when I do:
Statment stmt = (CallableStatement) conn.prepareCall("{call some_pkg.p_searc(?,?,?,?,?,?,?,?,?)}",
ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ResultSet.first();
I got the error message: Ivalid operation for forward only resultset : first 17075.
Thanks.
Mag

Thanks for your reply. But what I want to use first. One thing I don't understand is why even I use ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY, but the resultset is still not scrollable. How can I get a scrollable resultset. Thanks.

Similar Messages

  • 17076 : Invalid operation for read only resultset

    Hi,
    I am trying to update database table through java jdbc application.
    But while running the program i am getting the error message " Invalid operation for read only resultset: updateString " with error code 17076.
    My program is given below :
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class Misc2 {
    public static void main(String[] args) {
    Connection con = null;
    Statement stmt = null;
    ResultSet rs = null;
    try {
    con = JDBCUtil.getOracleConnection();
    stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
    String query = "select * from employees";
    rs = stmt.executeQuery(query);
    while (rs.next()) {
    String fname = rs.getString(3);
    if (fname.equalsIgnoreCase("Elmer")) {
    rs.updateString(3, "Mark");
    rs.updateString(2, "Robert");
    break;
    } catch (SQLException ex) {
    System.out.println("error code : " + ex.getErrorCode());
    System.out.println("error message : " + ex.getMessage());
    } finally {
    JDBCUtil.cleanUp(con, stmt);
    ****JDBCUtil Class****
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class JDBCUtil {
    public static Connection getOracleConnection(){
    Connection con = null;
    try{
    // Load the driver
    Class.forName("oracle.jdbc.driver.OracleDriver");
    //Establish Connection
    con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","ex","ex");
    }catch(Exception ex){
    ex.printStackTrace();
    return con;
    public static void cleanUp (Connection con , Statement stmt){
    // Release the resource
    try{
    if(con != null){
    con.close();
    if(stmt != null){
    stmt.close();
    }catch(Exception ex){
    ex.printStackTrace();
    Please help me to fix this issue.

    >
    But while running the program i am getting the error message " Invalid operation for read only resultset: updateString " with error code 17076.
    >
    Your result using 'SELECT *' is not updateable. Gimbal2 was pointing you in the right direction. You have to specify the columns in the select list to get an updateable result set.
    You also need to use 'updateRow()' to update the database and have a commit somewhere to keep the results.
    This code works for me. Note that I added an explicit SELECT list, the 'updateRow()' method and an explicit COMMIT.
        try {
            con = getOracleConnection();
            stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
    //        String query = "select * from employees";
            String query = "select first_name from employees"; -- added explicit SELECT list
            rs = stmt.executeQuery(query);
            while (rs.next()) {
                String fname = rs.getString(1);
                if (fname.equalsIgnoreCase("Adam")) {
                    rs.updateString(1, "Mark");
                    rs.updateRow();                                    -- need this statement to actually update the database
    //                rs.updateString(2, "Robert");
                    break;
            con.commit(); -- added explicit commit for testing
        } catch (SQLException ex) {See Performing an UPDATE Operation in a Result Set in the 'Updating Result Sets' section of the JDBC Developer's Guide and Reference
    http://docs.oracle.com/cd/B28359_01/java.111/b31224/resltset.htm#i1024720
    As gimbal2 also alluded it is considered poor practice to use column numbers to perform result set operations when you don't know for certain what column a given number refers to. Before people start jumping all over that statement let me clarify it. The key part is KNOWING what column you are referencing. It is more performant to access result column columns by column number rather than by column name since the methods that take a column name call the integer method under the covers anyway but have to search the array of column names in order to get the column number.
    With your query (SELECT *) there is no way to be sure the column order is the same since the table could be redefined with the columns in a different order or certain columns having been deleted. So for performance LOOP processing column numbers are used inside the loop but those column numbers are determined by using the metadata BEFORE the loop to convert column names to column numbers.
    That way you code (BEFORE the loop) can use column names but you use a set of integer variables (one for each column) for the actual access inside the loop.

  • Invalid operation for read only resultset:

    Hi.
    I'm developing an app that connects to Oracle, but I ran into the following problem:
    When I create a Statement, I specify
    that I need an Updatable ResultSet with the following code:
    Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    ResultSet rset =stmt.executeQuery(somesql);
    When I try to update the ResultSet, I get an SQLException: java.sql.SQLException: Invalid operation for read only resultset: updateString
    Am I
    doing something wrong or is this a bug?
    Any info is greatly appreciated.
    null

    There are limitations on the kinds of queries you can perform. If the query is not suitable for update, it reverts back to readonly automatically. Read the below article about limitations and examples.
    http://technet.oracle.com/doc/oracle8i_816/java.816/a81354/resltse2.htm
    null

  • "Invalid op for forward-only resultset : last"

    I am trying to use the oracle jdbc drivers in classes12.zip to connect to an Oracle 8.0.6 database. The documentation for classes12.zip says that these drivers allow scrollable ResultSets, but whenever I try to use ResultSet.absolute(), ResultSet.relative(), ResultSet.first(), or ResultSet.last(), I get SQLException : "Invalid op for forward-only resultset : last"
    Is there something special I need to do to my statement or resultset object to enable a scrollable ResultSet? My code looks like this:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String userID = "scott";
    String passwd = "tiger";
    //I'm certain I have the correct
    //connection data in the
    //real version of this program
    Connection con = DriverManager.getConnection("jdbc:oracle:thin:@XXX:XXX", userID, passwd);
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("select * from mytable");
    Any suggestions?
    null

    What if I was using a CallableStatement (prepareCall() & execute()) to get my result set as a return value from a PL/SQL procedure instead of above case where a Statement (createStatement() & executeQuery()) were used. How can I make the ResulSet be scrollable? Please see below sample code.
    CallableStatement cstmt = dbConn.conn.prepareCall("{ ? = call pkg_MyPkg.fn_MyFn }", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
    cstmt.registerOutParameter(1, OracleTypes.CURSOR);
    boolean b = cstmt.execute();
    OracleCallableStatement tstmt = OracleCallableStatement)cstmt;
    ResultSet cursor = tstmt.getCursor (1);
    // this works AOK
    while (cursor.next ())
    System.out.println(cursor.getString(1));
    // the following does not work
    b = rsetGetFn.first();
    System.out.println(cursor.getString(1));
    b = rsetGetFn.last();
    System.out.println(cursor.getString(1));
    The call cursor.getType() returns ResultSet.TYPE_FORWARD_ONLY, how can I get it to be ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_SCROLL_SENSITIVE?
    Any help will be apreciated.
    V/R,
    -aff
    null

  • When trying to install an extension for InDesign CC 2014 I get an error message saying that the extension only works with version 7.0 or greater. My version is 10.0.0.7 x64 Build I was using this extension fine with InDesign CC

    When trying to install an extension for InDesign CC 2014 I get an error message saying that the extension only works with version 7.0 or greater. My version is 10.0.0.7 x64 Build I was using this extension fine with InDesign CCError message with InDesign CC 2014

    Used the 64bit version before CC 2014 as well so don't think that's the issue. Here is the text in the .mxi file if I have missed something:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <macromedia-extension id="PrintUI Tools" name="PrintUI Tools" requires-restart="true" version="3.0.0">
      <author name="PrintUI.com"/>
      <description/>
      <license-agreement/>
      <products>
        <product maxversion="" name="InDesign" primary="true" version="7.0"/>
      </products>
      <files>
        <file destination="" file-type="CSXS" products="" source="PrintUIManagement.zxp"/>
      </files>
      <update url="http://printui.com/public/downloads/updates/printui_tools_update.xml"/>
    </macromedia-extension>

  • I'm trying to transfer a quicktime file, when I drop the file in my hard drive I get the following error message "The operation can be completed because an unexpected error occured (error code 0). It only happens with this particular drive.

    I'm trying to transfer a quicktime file, when I drop the file in my hard drive I get the following error message "The operation can be completed because an unexpected error occured (error code 0). It only happens with this particular drive.

    Run Disk Utility and try to verify/repair the drive to see if it reports and fixes anything.

  • Error message: The request for account "iCloud" failed.  The server responded with "400" to operation CalDAVUpdateShareesQueuableOperation.

    I created a new public iCAL. Trying to send invitations to join and am receiving this error message:
    The request for account “iCloud” failed.
    The server responded with
    “400”
    to operation CalDAVUpdateShareesQueuableOperation.
    Tried copying the URL link provided for the Calendar into a MailChimp announcement.  Not working.
    I've tried the uncheck calendar method on iCLOUD and re-checking to stop the pop-up message.
    Is this perhaps because they don't have an iCLOUD account? If they have iTUNES, shouldn't it work?
    Appreciate any help. 

    Try this first:
    In iCal Preferences…, choose Accounts, then select the account that is giving you trouble. Uncheck the box labeled Enable this account. Wait a few seconds, then re-check the box. This should solve the problem.

  • I receive this error message "The operation cannot be completed because the original item for "backup" cannot be found.

    I performed a clean install of Lion, then upgraded to Yosemite. Now, i am trying to restore files and programs from my backup in my time capsule but when i connect to the backup folder i receive this error message "The operation cannot be completed because the original item for "backup" cannot be found.
    I previously had mavericks installed and was able to backup and restore just fine. I do believe that within the time since i last performed a backup or restore there was an update for the time capsule that i ran using my iPhone. I need a solution to this issue.

    Yosemite can take a very long time to index the backup.. and it seems to be impossible in my own testing to get back beyond the latest one.
    If you cannot manage a migration.. which I guess is what you are trying to do.. see if you can do a full restore to a USB drive plugged into your computer.

  • SFTP Receiver adapter error Message could not be forwarded to the JCA adapter

    Hi Experts,
    I'm needing help to solve a problem with an SFTP Receiver interface.
    Before I was sending in the adapter configuration as "Direct" in Write Modus (File .txt) and now I changed to "Use temporary file" is occurring this error:
    Message
    could not be forwarded to the JCA adapter. Reason: 2: Moving
    /ABCftp/To_XXX/140187613515701OUT_20140604-100214-622.TXT.tmp to /ABCftp/To_XXX/01OUT_20140604-100214-622.TXT failed.
    Files as TXT they are being written to the SFTP however when as TMP returns this error ... would not rule SFTP server to accept different TXT files?
    I also changed the namespace to "http://sap.com/xi/XI/System/SFTP" and "http://sap.com/xi/XI/System/File" but is not working.
    Any help will be welcome!
    tks.

    Hi Durga and Naveen...
    I believe the problem is when the application's legacy system picks up the file because the log file got the "tmp", ie, was not formed yet ...
    I changed to a directory without the intervention of the legacy application and it worked.
    I'm waiting for the opportunity to modify the legacy system to capture only files with the extension TXT.
    Tks All for help!

  • I keep getting the error message "The operation can't be completed because you don't have permission to access some of the items."

    When I try and move an application to my application folder from the installer and when I try to empty the trash, I get the error message, "The operation can’t be completed because you don’t have permission to access some of the items."  This has only been an issue since I upgraded to Lion.  I'm using a July '07 white Macbook 2.16 Intel Core 2 Duo.  In my trash I only have an older version of a software that I updated (Divy).  The software I'm trying to install is Angry Birds Rio.

    Always use the same websites you are having problems with so you can monitor the changes.
    Try the reset for Safari:
    And for Firefox:
    http://www.ehow.com/how_6874158_keyboard-working-certain-websites-firefox.html
    Try logging in to the guest account as well to see if you have the same problems there, it might be a logging in issue.

  • Cannot backup my files / copy my files and folders due to error message " The operation can't be completed because an item with the name ".DS_Store" already exists. "

    Hi Apple community!
    I have a [rather worrying] problem.
    When I try to copy all my files from my documents on my mac [or the entire documents folder] into an external drive, I get this error message
    " The operation can’t be completed because an item with the name “.DS_Store” already exists. "
    I am not given an option to skip this file or anything else.
    But I simply cannot complete the operation!
    I have tried deleting a few of the .ds_store files, [both in the original and in the destinations]
    but no success.
    The same thing keeps happening.
    At first, this was just happening when I was trying to backup to my dropbox folder [the one on my mac's harddrive, which gets synced to the cloud],
    but then I tried to back up my documents to my external hard drive, and I realized it is giving me the same error message.
    So effectively, it seems I cannot backup my files anywhere!
    Any help or advice would be greatly appreciated.
    Thank you.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, or by corruption of certain system caches. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled on some models, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output and  Wi-Fi on certain iMacs. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Error message "The operation can't be completed because an item with the name .DS_Store already exists"

    Major headaches with copying files and folders between drives. I constantly (and I mean constantly) have to resort to copying files across in small batches (fewer than 10 works best) because anytime I try to copy lots of files and folders from my mac to an external hard drive (or from one external HD to a second external HD), I ALWAYS get the error message  "The operation can't be completed because an item with the name .DS_Store already exists".
    The files and folders are all Mac-generated, so hint or trace of foreign OSs in the mix.
    All file types are susceptible
    the HDs are all Mac OS X formatted, no foreign file formats involved
    the HDs are all journal-enabled, OS X extended formats
    have looked on here for previous posts, past suggestion was to disable creation of DS_Store files - not really a solution and realistically, defeats the purpose of their creation
    any ideas anyone?
    would appreciate any thoughts or sugestions, this has got me beat
    the context is that I have a lot of image files that I am copying (trying to...) new external 3TB drives for backup and the job appears endless if I have to do this in batches of 10 or so..!
    many thanks for any suggestions

    This is definitively a nuisance. When copying large amounts of files between volumes  try opening a terminal window and use use ditto. You need to type the directory paths of the source and the destination volume. When it starts ditto just coupes and optionally overwrites anything on the destination. You can get a verbose mode where it lists all activities.
    gunnars-mac-mini-i7:Volumes gunnar$ man ditto
    NAME
         ditto -- copy directory hierarchies, create and extract archives
    SYNOPSIS
         ditto [-v] [-V] [-X] [<options>] src ... dst_directory
         ditto [-v] [-V] [<options>] src_file dst_file
         ditto -c [-z | -j | -k] [-v] [-V] [-X] [<options>] src dst_archive
         ditto -x [-z | -j | -k] [-v] [-V] [<options>] src_archive ... dst_directory
         ditto -h | --help

  • When I try to upgrade and install to iOS 5.1, error message prompt "operation stop running". I have tried several time but failed. Also, would like to know why always need to have wifi access in order to upgrade the version of iPad iOS, why not 3G ?

    When I try to upgrade and install to iOS 5.1, error message prompt "operation stop running". I have tried several time but failed. Also, would like to know why always need to have wifi access in order to upgrade the version of iPad iOS, what is the purpose of 3G then? This is really nonsense using wifi + 3G iPad. need help ! Thanks.

    The file is too large to download via 3G. There is a 20MB limit with 3G. The purpose of having 3G is that you have internet access everywhere and do not need to be near a WiFi hotspot or network.
    Not every single thing that you do every single minute of the day on the iPad involves downloading files larger than 20MB. You can surf the internet all day long sitting out in a park somewhere with 3G - but not with a WiFi only iPad - unless you use a hotspot with it.
    Try turning off your firewall and anti virus software while you try to download the iOS update.

  • Error message: The data for filename was already added to the form

    I recently modified an existing data-collection PDF - only mod was to add some additional pull-down menu options in two fields. I went thru the Distribution wizard, tested the revised form, added the PDF to the Responses file...everything seemed fine. Next day, I distributed the revised form, and had 22 submissions. When adding the 22 submissions to the Response file, 6 or 7 bounced with the error message "The data for <filename> was already added to the form", even though that was not true. I went back, cleared all, and added one of the "bad" files to the response form. It went in OK, but I could not add another "bad one". Although several of the forms may be submitted by the same person, the data is different in all of the submissions, plus, we've been doing this procdure for over a year and never had an issue until now.
    The original form may have been created in Acrobat X, and I have Acrobat 9 Pro. Not sure if that is part or all of the answer. Thanks for any insights...I saw a posting in the Reader side, but I can't see any answers.

    Hi
    According to your error message, we need to verify if Microsoft SQL Server Compact appears in the
    Change Data Source dialog. If not, you need to install
    SQL Server Compact components for Visual Studio firstly, and if you choose to install SQL Server Compact 4.0 , you should note that SQL Server Compact 4.0 supports in Visual Studio 2010 Service Pack 1 or later versions. I recommend you to install the latest
    Service Pack (SP) of SQL Server Compact, and latest SP of Visual Studio, then check if the error still occurs. For more information, see:
    http://blogs.msdn.com/b/sqlservercompact/archive/2011/03/15/sql-server-compact-4-0-tooling-support-in-visual-studio-2010-sp1-and-visual-web-developer-express-2010-sp1.aspx
    However if there is no problem with the installation of SQL Server Compact, it will be an issue that regards ASP.NET and website deployment. I suggest you to post the question in the ASP.NET forums at
    http://forums.asp.net/ . It is appropriate and more experts will assist you.
    In addition, you can review the following link:
    Working with SQL Server Compact in Visual Studio:http://msdn.microsoft.com/en-us/library/gg606540(v=vs.100).aspx
    Thanks
    Lydia Zhang

  • Script Error message when checking for updates....

    Post Author: rcoleman
    CA Forum: General Feedback
    Getting a Script Error message when checking for updates or logging in to Crystal Reports. CR Developer v XI 11.0.0.1994.
    Script Error
    Line 481
    Position 41
    If g3()=True then main=True: Exit Fun
    FYI to the Site Administrator

    parkerpress wrote:
    Any idea how to solve this if I haven't activated the 3GS service? I've been doing fine on wireless only.
    Steve
    Same problem here. After upgrading to iOS 4.2.1 a couple of weeks ago I'm getting the same error as the OP in the first post. I've never activated the 3G service.
    I tried turning the cellular service on and checking for updates, pulled and replaced the SIM card, rebooted, nothing helps. I'm still getting the error when I click on the "Check for Update" button in iTunes (v10.1) when my iPad 64GB 3G is connected to my iMac. Any help would be appreciated. TIA.

Maybe you are looking for