Find affected rows when using OCIBindArrayOfStruct for UPDATE statement

If I run a bulk UPDATE query using OCIBindArrayOfStruct, is there a way I can tell which+ rows successfully updated?
I have a file of records of which 75% of PKs are already in the table and will be updated, the other 25% aren't and should be inserted later. I want to attempt an UPDATE statement on each entry in the file, using OCIBindArrayOfStruct to execute in bulk, and then check which entries in my bulk array successfully updated. If an array entry isn't successfully updated then I will assume it should be inserted and will store it for a Direct Path load later.
Many thanks for any advice you can give as I've been trawling through the docs trying to find a solution for ages now.
Edited by: Alasdair on 15-Oct-2010 02:13

To get count from DB using dynamic SQL, you might need form to call a DB function that can run a query and return a number.
ie
CREATE OR REPLACE FUNCTION get_count(pTable VARCHAR2, pWhere VARCHAR2) RETURN NUMBER IS
   vCount VARCHAR2(2000);
BEGIN
   EXECUTE IMMEDIATE
      'SELECT COUNT(1) FROM '||pTable||' WHERE '||pWhere
   INTO vCount;
   RETURN vCount;
END;Then in your form you do:
   vUpDCnt := get_count(pTable=>'some_table',pWhere=>'...');Hope this helps.

Similar Messages

  • Error when using Check For Updates

    When I try to get updates using Help->Check For Updates I got following error:
    java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/html4/loose.dtd
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1313)
         at java.net.URL.openStream(URL.java:1010)
         at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2639)
         at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:301)
         at oracle.xml.parser.v2.NonValidatingParser.pushExternalDTD(NonValidatingParser.java:607)
         at oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl(NonValidatingParser.java:523)
         at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:355)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:313)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:225)
         at oracle.javatools.xml.esax.spi.ExtensibleSAXParser.parse(ExtensibleSAXParser.java:65)
         at oracle.ideimpl.webupdate.parser.MasterListParser.parse(MasterListParser.java:47)
         at oracle.ideimpl.webupdate.CheckMasterListRunnable.run(CheckMasterListRunnable.java:148)
         at java.lang.Thread.run(Thread.java:619)
    After examining the response I found following link [http://w3.org/brief/MTE2] in response.
    Does any one know how to fix it ?

    java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1313)
         at java.net.URL.openStream(URL.java:1010)
         at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2639)
         at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:301)
         at oracle.xml.parser.v2.NonValidatingParser.pushExternalDTD(NonValidatingParser.java:607)
         at oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl(NonValidatingParser.java:523)
         at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:355)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:313)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:225)
         at oracle.javatools.xml.esax.spi.ExtensibleSAXParser.parse(ExtensibleSAXParser.java:65)
         at oracle.ideimpl.webupdate.parser.MasterListParser.parse(MasterListParser.java:47)
         at oracle.ideimpl.webupdate.CheckMasterListRunnable.run(CheckMasterListRunnable.java:148)
         at java.lang.Thread.run(Thread.java:619)
    the same error
    problem still exist
    is there a workaround?

  • When is SELECT FOR UPDATE used

    DB version:10gR2
    Since another thread of mine on this subject didn't go well, i am starting another thread.
    When exactly is SELECT..FOR UPDATE statement used? With the exception of using SELECT...FOR UPDATE in CURSOR declaration, I've rarely seen SELECT ...FOR UPDATE being used explicitlyby PL/SQL gurus in our firm. Why didn't they use SELECT..FOR UPDATE(i mean a stand alone SELECT FOR UPDATE, <em>not as a part of Cursor</em>) to lock rows before UPDATE/DELETE/INSERT in their codes?
    Edited by: M.Everett on Oct 20, 2008 12:00 PM
    edited the initial post to let the users know that I am refering to a stand alone SELECT FOR UPDATE statement, not the part of a cursor

    M.Everett wrote:
    What i gather from various sources in the Internet:
    1. SELECT FOR UPDATE is used mainly on CURSORs and very rarely used as a stand alone statement (if this is not the case you would have seen SELECT FOR UPDATE statements before every UPDATEs and DELETEs in PL/SQL codes)
    2. Stand alone SELECT FOR UPDATEs are used mainly when dealing with CLOB, BLOB
    Am i right in making these conclusions?1. This is probably a fair assumption.
    2. Not really. SELECT FOR UPDATE is not a requirement when dealign with (C|B)LOBs.
    SELECT FOR UPDATE allows an easy form of reference when you come to update rows in a cursor loop (although cursor loops should be rarely used), because rather than having to include a where condition on key columns you can just refer to the CURRENT ROW. Obviously, the main reason for using SFUs is the locking and this can become a requirement in some business environments where a user "picks up" a record to deal with and other users will then not see that record in their list or be able to select it for themselves.
    ;)

  • I am updating iphoto 9.1 to 9.3 and every time when I clicked for update aps store asked to open it in the account where you purchased. I am using the same account and its available in the purchased item of this account. Can someone resolve this problem.

    I am updating iphoto 9.1 to 9.3 and every time when I clicked for update aps store asked to open it in the account where you purchased. I am using the same account and its available in the purchased item of this account. But in my purchased item library it indicates that you update iPhoto. I am not sure which account the aps store asking. Can someone resolve this problem.

    Contact App Store support. They're the folks who can help with Account issues.
    Regards
    TD

  • HT4972 I'm trying to update my iphone 3G to ios5 - however in Itunes when I 'check for updates' it is advising me that I have the latest version (4.2.1). Hence I can't update and now I can't run a few of the apps I previously used. Help!

    Following a backup and restore of my iphone 3g I have lost the use of a number of apps - this seems to be as they need ios5 or later to support them and I only have 4.2.1
    When I check for updates via itunes I am advised that I have the latest version - but clearly I don't.
    Any help gratefully received on how I can upgrade to ios5
    Yally

    Sadly, the iPhone 3G can not be upgraded beyond iOS 4.2.1.

  • Row cannot be located for updating. Some values may have been changed...

    Hello,
    I have a legacy application written in VB6 and using Oracle OLEDB Provider (version 9 and updated to the last ones from oracle site)
    I've a problem during insert of a record using recordset method (AddNew).
    The returned message is "Row cannot be located for updating. Some values may have been changed since it was last read. "
    I know that problem is caused by a Before Insert trigger that I CANNOT change.
    Trigger does not change any primary key values !!!. It put only some default values on other not rilevant columns.
    I tried to use the recordset Property option "Update Criteria" = adCriteriaKey without success !
    I had same problem with SQL Server but i solved putting into the trigger SET NOCOUNT ON.
    I think problem is related to the fact that ADO tries to calculate number of affected rows and for doing that it use a where clause built on the changed columns but using values it had on the client.
    Other important info:
    Cursor = adUseClient (and i cannot adUseServer)
    Provider= MSDAORA (version 9.2...)
    Oracle server = 9.1
    Trigger causing problem = BEFORE INSERT (for each row)
    Thanks in advance
    Luigi

    Hello,
    I have a legacy application written in VB6 and using Oracle OLEDB Provider (version 9 and updated to the last ones from oracle site)
    I've a problem during insert of a record using recordset method (AddNew).
    The returned message is "Row cannot be located for updating. Some values may have been changed since it was last read. "
    I know that problem is caused by a Before Insert trigger that I CANNOT change.
    Trigger does not change any primary key values !!!. It put only some default values on other not rilevant columns.
    I tried to use the recordset Property option "Update Criteria" = adCriteriaKey without success !
    I had same problem with SQL Server but i solved putting into the trigger SET NOCOUNT ON.
    I think problem is related to the fact that ADO tries to calculate number of affected rows and for doing that it use a where clause built on the changed columns but using values it had on the client.
    Other important info:
    Cursor = adUseClient (and i cannot adUseServer)
    Provider= MSDAORA (version 9.2...)
    Oracle server = 9.1
    Trigger causing problem = BEFORE INSERT (for each row)
    Thanks in advance
    Luigi

  • HT201232 My operating system is Mac OS X 10.6.8 and when I'm surfing the web, it tells me I need to update my browser however when I check for updates, nothing comes up. What do I need to do to get Mac OS X Lion v10.7?

    My operating system is Mac OS X 10.6.8 and when I'm surfing the web, it tells me I need to update my browser however when I check for updates, nothing comes up. What do I need to do to get Mac OS X Lion v10.7?

    Software update will only bring you up to the current level of the system you are using - you are at the maximum for Snow Leopard. To get Lion or higher you will have to go to the Mac App Store in Applications and purchase it there (Yosemite is free). You will need to check that your Mac meets the requirements and you should particularly note that PPC programs such as AppleWorks will not run in Lion or above.
    The requirements for Lion are:
    Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7, or Xeon processor
    2GB of memory
    OS X v10.6.6 or later (v10.6.8 recommended)
    7GB of available space
    Lion is available in the Online Apple Store ($19.99). Mountain Lion (10.8.x) is also available there at the same price (though it's reported to have been removed from sale in some countries so may well cease to be available generally) but there seems little point as the system requirements are the same for Yosemite (10.10.x) - which is free - unless you need to run specific software which will run on Mountain Lion only.
    The requirements for Mountain Lion and Yosemite are:
    OS X v10.6.8 or later
    2GB of memory
    8GB of available space
      and the supported models are:
    iMac (Mid 2007 or newer)
    MacBook (Late 2008 Aluminum, or Early 2009 or newer)
    MacBook Pro (Mid/Late 2007 or newer)
    Xserve (Early 2009)
    MacBook Air (Late 2008 or newer)
    Mac mini (Early 2009 or newer)
    Mac Pro (Early 2008 or newer)
    Yosemite is available from the Mac App Store (in Applications). Mountain Lion can be obtained the Online Apple Store. (Mavericks is no longer available.)
    If the problem is only with Safari and you are otherwise happy with Snow Leopard you could switch to FireFox (free) - the latest version of that will run in Snow Leopard.

  • TS1717 I have older version of itunes on Windows Vista, when i check for updates it states it cannot connect to itunes update server even though i am connected to the internet, i have an iphone that has songs in the cloud and i wan to add them to my libra

    I have older version of itunes on Windows Vista, when i check for updates it states it cannot connect to itunes update server even though i am connected to the internet, i have an iphone that has songs in the cloud and i want to add them to my library?

    Try updating your iTunes using an iTunesSetup.exe (or iTunes64Setup.exe) installer file downloaded from the Apple website:
    http://www.apple.com/itunes/download/

  • How can I show additional tab rows when using many open tabs?

    How can I show additional tab rows when using many open tabs?

    What method (code) did you use to get the Tab bar displaying in the space used for the Navigation Toolbar (location bar)?
    The Tab bar should be displayed above the Navigation Toolbar.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Since I recently installed pages on my iPad when I try to edit a file on my mac it requires me to update the programme however when I search for updates none seem to be available.

    Since I recently installed pages on my iPad when I try to edit a file on my mac it requires me to update the programme however when I search for updates none seem to be available.

    What version are you using?
    The latest version of Pages('09) is 4.3
    http://support.apple.com/kb/DL1563

  • Is it possible to ignore "Rigid relationships between attributes cannot be changed" when using ProcessUpdate for Dimension?

    As per the title is it possible to ignore "Rigid relationships between attributes cannot be changed" when using ProcessUpdate for Dimension?
    We have a case where very rarely an item might have been miscategorised so the brand is manually changed.  We want this dimension to be rigid to speed up ProcessUpdate.
    We do a ProcessFull each night, so it will get corrected then, but during the hourly updates we would just like to ignore this error if possible?

    Hello,
    The rigid relationship should be defined when the members will not change over time. Here are some threads regarding rigid relationship for your reference, please see:
    Processing OLAP Cube: http://social.technet.microsoft.com/Forums/sqlserver/en-US/17a55593-9543-404e-a579-0a011965585d/processing-olap-cube?forum=sqlanalysisservices
    Flexible and rigid relationship: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/2d8f5443-065d-4485-9385-6f0b5fa417da/flexible-and-rigid-relationship?forum=sqlanalysisservices
    If you have any feedback on our support, please click
    here.
    Regards,
    Elvis Long
    TechNet Community Support

  • When does select for update release locks

    Hello all,
    Does anyone know when Oracle realeases the row locks when a
    select for update is issued?
    Does Oracle realase the row lock at the time when an actual update statement is
    issued for the locked row, or does it wait until a commit statment is executed?
    So for example, can I lock several rows with a select for update clause, and then
    issue update statements as many times as I want on each locked row without
    having to worry about the lock being released until I issue a commit statement.
    Thanks,
    David

    yes.
    The lock is released only when your transaction ends. A transaction can end because of:
    1). Commit.
    2). Rollback.
    3). client disconnects.
    etc. etc...

  • My powermac G5 is on an old iTunes and when I look for update it says there is no updates

    My powermac G5 is on an old iTunes and when I look for update it says there is no updates

    If it's running Mac OS X 10.4.11, it can use iTunes 9.2.1.
    If it's running Mac OS X 10.5.8, it can use iTunes 10.6.3.
    (80299)

  • Bought a new iMac 27" yesterday.  Attempting to download Adobe Creative Suite 5 Design Premium. Loaded software from discs. When I check for updates they fail to install. A window comes up saying "Some updates failed to install." Then under each applicati

    I bought a new iMac 27" yesterday, running with Mavericks OS.  Attempting to download Adobe Creative Suite 5 Design Premium. Loaded software from discs. When I check for updates they fail to install. A window comes up saying "Some updates failed to install." Then under each applications it says "There was an error downloading this update. Please quit and try again later." Have done this several times. Suggestions?

    update manually,:  http://www.adobe.com/downloads/updates/

  • My MacKeeper says iPhoto is out of date.  When I try to update the App Store says I need IOS 10.9 or later.  I have 10.7.5 and when I check for updates my Mac says the software is up to date.  How do I solve this problem??

    My MacKeeper says iPhoto is out of date.  When I try to update it, the App Store says I need IOS 10.9 or later.  I have 10.7.5 and when I check for updates my Mac says the OS software is up to date.  How do I solve this problem??

    1. First step to solving the Problem: Trash MacKeeper. It's a pile of trash that does far more harm to your computer than good.
    https://discussions.apple.com/docs/DOC-3691
    2. What version of iPhoto do you have? (iPhoto Menu -> About iPhoto)

Maybe you are looking for

  • Disable delete button in ALV grid

    Hi Experts, I have a functionality to disable some buttons in alv grid such as delete row,cut,print etc. I know how to exclude them by using it_toolbar_excluding , but I need to disable them. Can you please let me know how to handle this. I am displa

  • Acrobat 11.0.09 With IE11 - Not Compatible With Enhanced Security

    We've packaged Acrobat 11.0.09 for deployment with the Customization Wizard and the install goes fine.  We are having issues when try to view linked PDF files in Internet Explorer 11 (Enhanced Security is on) on Win7 64-bit PCs.  We are receiving pro

  • File name on the menu page of a DVD project

    When I import my video project into iDVD 5.0 the file name ends up on the Menu page. If I try to delete it, it erases the project from the DVD. How do I get rid of the file name on my menu page without deleting the video itself? Dual G4 1000hnz   Mac

  • FINDER WINDOW OPENS UP AFTER STARTUP !!!!

    Hi all i seem to be having a problem that was not happing before I installed the Latest Mac OS X 10.6.5 (10H574) update. Here is the problem when I startup The system and log on after the desktop shows up a finder window opens To the top level in oth

  • Flash CS3 -- slow undo?

    Im just getting into CS3 and have noticed a lengthy time-lag when using the undo function compared to v.8. Its a consistent problem, and I checked back in v.8 and the undo works immediately. Try painting a stroke, then hit undo, is there a second whe