dbms_hs_passthrough.execute_non_query returns 0

According to the documentation dbms_hs_passthrough.execute_non_query returns the number of rows affected by the SQL statement in the non-Oracle system.

My procedure below run without error

CRS: = DBMS_HS_PASSTHROUGH. OPEN_CURSOR@MSQL;
DBMS_HS_PASSTHROUGH. PARSE@MSQL (SRC,
' INSERT IN WCUST ("cust_code", "cust_name", "cust_address1", "cust_address2", "cust_phone1", "cust_phone2", "cust_fax", "cust_email", "cust_contact1", "cust_contact2", "|")
""dest_code","Zip_code", 'flag_pkp', 'cust_type', 'cust_npwp', 'flg_code')' |"
'VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)');
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 1, TCUSTCODE);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 2, TCUSTNAME);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 3, TCUSTADDRESS1);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 4, TCUSTADDRESS2);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 5, TCUSTPHONE1);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 6, TCUSTPHONE2);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 7, TCUSTFAX);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 8, TCUSTEMAIL);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 9, TCUSTCONTACT1);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 10, TCUSTCONTACT2);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 11, TDESTCODE);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 12, TZIPCODE);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SRC, 13, TFLAGPKP);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 14, TCUSTTYPECODE);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 15, TCUSTNPWP);
DBMS_HS_PASSTHROUGH. BIND_VARIABLE@MSQL (SIR, 16, TFLGCODE);
RESULT: = DBMS_HS_PASSTHROUGH. EXECUTE_NON_QUERY@MSQL (CRS);
IF RESULT > 0 THEN
DELETE FROM OSYS_UPDATE_LOG WHERE UPDATE_ID = C.UPDATE_ID;
ON THE OTHER
DBMS_OUTPUT. PUT_LINE ("RESULT =" |) (RESULT);
END IF;
DBMS_HS_PASSTHROUGH. CLOSE_CURSOR@MSQL (CRS);

and lines that are inserted to MSQL successfully, but why the RESULT variable returns 0. I thought it should be 1.

Can someone help me?

Hello
This is a known issue and there is a patch for some versions and plates-formes-

Patch 12731763: DBMS_HS_PASSTHROUGH. EXECUTE_IMMEDIATE DOES NOT RETURN THE NUMBER OF ROWS AFFECTED

Have a search on My Oracle Support for your version and Platform for this patch. If this is not available, then open a SR with Oracle's Support to get it for your platform and version.

Kind regards
Mike

Tags: Database

Similar Questions

  • How to use bind variable to update the DB 11 GR 2 access data

    Hello Experts,

    By DB version 11 GR 2

    Operating system Windows Server 2012 - 64 bit

    I want to update some data base record Access to oracle with database link. Here is my SQL, which works.

    UPDATE Transaction@DB_LINK
    SET "WorkCode"=1
    WHERE "WorkCode"=0; 
    

    But, I need to change that to

    UPDATE Transaction@DB_LINK
    SET "WorkCode"=1
    WHERE "DateTime"=:VARIABLE_DATE_TIME; 
    

    and a 2nd does not.

    Any code help or example?

    Ask2Learn

    Hello

    Use DBMS_HS_PASSTHROUGH

    try something of

    DECLARE
      c       BINARY_INTEGER;
      nr      NUMBER;
    BEGIN
    
      c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@DB_LINK;
    
      DBMS_HS_PASSTHROUGH.PARSE@ATTD_ENVOYF(c,'UPDATE Transaction@ATTD_ENVOYF SET "WorkCode"=1
      where "DateTime" = '||''||VARIABLE_DATE_TIME||'');
      nr:=DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@DB_LINK(c);
      DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@DB_LINK(c);
    
    END;
    

    Hope this helps

    Hamid

  • Sierra is a bomb, need help to return to El Capitan

    Could someone more at Apple just try it once to make sure that the "new and improved" operating systems actually work before releasing? With all the money goes to Cupertino, there is no money to hire testers rather than rely on Mac users? Talk about Stockholm syndrome. I'll cut to the Chase, now my computer has been upgraded to Sierra without my knowledge, and several apps are now, not to mention that I can't access my company's server today. How to return to El Capitan - can I save all my work from today and use Time Machine to restore my machine? If this isn't the case, should I really erase everything and start from scratch? Someone please stop me to jump on a ledge, I have work I need to pass on to customers. Any suggestions, help, you can give would be appreciated. Carl

    Restore your backup, and if you do not upgrade your Mac, who did? Maybe you should tell them not to do the without you knowledge or approval.

  • How can I uninstall Sierra & return to El Capitan without an external hard drive or equivalent required by the instructions online?

    How can I uninstall Sierra & return to El Capitan without an external hard drive or equivalent required by the instructions online? I find too many misadventures and not happy.

    Hello

    Check out this useful tutorial: https://www.igeeksblog.com/how-to-downgrade-macos-sierra-to-mac-os-x-el-capitan/

  • Deleted Notes records returned

    I have a folder in my Notes (Mac, iOS and iCloud.com) application that returns no matter how many times I delete it.

    Here's how I got here: I imported a batch of notes (all in .txt format) and created a new 'imported statement' as expected. I then moved all those notes to my regular 'Notes' folder that is synchronized to my iCloud account. Now that the newly created folder is empty, I'm deleting it. After maybe 40 seconds, he returned. I tried rename and delete then, put a note in it there and delete... it always comes back.

    All this experience or have a fix? I can't simply sign on and in, or restart my camera, because it happens everywhere that I can access my notes (iPad, iPhone, iMac, Safari). Thank you.

    See if this thread on the similar theme helps.

  • How to display invisible characters (space, return, etc.)

    How do you do the Numbers (4.0) app shows invisible characters such as space and return transport?

    I'm not aware of a direct way to display invisible characters in numbers - regardless of the version.

  • Sierra WiFi downloaded to restart ElCapitan OK on Sierra Message can not find material Wi - Fi, that it still works if I returned to ElCapitan?

    Sierra Wireless downloaded ElCapitan OK. Restart on the Sierra.  Message received! Computer can not find the Wi - Fi equipment? It still works if I returned to ElCapitan! Wi - Fi is not compatible, it is possible to access the internet if I use a cable a very long cable that extends the House and stairway access.

    What model Mac Pro?

    Wifi originally came with the Mac Pro?

  • C error: ld: library not found for - introduction collect2: error: ld returned 1 exit status

    I'm trying to compile the "Hello World" code C base with gcc, but the following error message:

    LD: library not found for - introduction

    collect2: error: ld returned 1 exit status

    The code itself is nice, he ran into another computer with no problems.

    First gcc had manually, the problem, installed and then uninstalled and installed with homebrew and still have the problem. How can I fix?

    (Have the 5.1.0 version of gcc)

    Okay, so nobody has responded, but I found a solution. This is the version of gcc, apparently more recent versions have this bug, one that works and compiles the codes is the 4.9 version, in case it would be useful to someone.

  • Returns

    Hello! I ordered a 7 sillicone iPhone a few days previously in Miami (it is supposed to arrive tomorrow) and yesterday, I decided to send it back. I live in the Venezuela and I would return when I get to get to US, so I don't have to worry about my friend (the one who gets the phone at his home) for this task, but apple sent saying me that I send the rear element by October 9.

    I would like to know if I'll have any problem if I return the item by myself in November in the apple store.

    Thank you very much!

    Hello

    The reporting period under Apple's Standard to the United States return policy is 14 days of purchase.

    I'm afraid that no one here can tell you that Apple will make an exception in your case - it is a community based on the user.

    You have to ask Apple.

  • I'm recently back from Berlin where I accidentally left my iPhone 6. My friend tried to send it to me; However, he was returned by customs. Need advice on getting my iPhone 6 sent from Berlin to California.

    I'm recently back from Berlin where I accidentally left my iPhone 6. My friend tried to send it to me; However, he was returned by customs. Need advice on getting my iPhone of Berlin has been sent to California.

    You'll have to talk to the German customs and find out what their requirements are to send an iPhone.

  • Need a formula which uses the VLOOKUP and HLOOKUP function to return a single value

    I'm creating a worksheet price with multiple values. In the table below if I select size 16 in blue the result must return 19.5

    Red Yellow Blue Green
    size
    10 5 6.25 7.5 8.75
    12 13 14.25 15.5 16.75
    14 15 16.25 17.5 18.75
    16 17 18.25 19.5 20.75
    20 19 20.25 21.5 22.75

    Hi Eric,.

    More large table is Table 1.

    Formula is C2 of table 2.

    C2: = INDEX (1::A1:E7, GAME table (Table a, 1::A, 0), GAME (B2, 1::1:1, 0),-l' surface index)

    Kind regards

    Barry

  • Is there a way to return to El Capitan of macOS Sierra

    I upgraded too early. The software that I use to control my camera for macro photography is not compatible with the Sierra. The company says the software my use of the camera won't be at level leaving me left side.

    Is it possible or there will be a way to return to El Capitan?

    Thank you

    If you have a full time Machine backup of before installing Sierra, you can come back as described here:

    macOS Sierra: return to an earlier version of Mac OS

  • iMac returns to the login screen once logged on 10.11.6 version

    After you install the update for El Capitan 10.11.6 my iMac (21.5 "mid-2010) returns to just login screen after I connect.  The disc is fine and the permissions are correct.  I can start safe mode and connect without problems.  Any ideas?

    Greetings JPfromFairfield,

    Thanks for your post. I see that your Mac goes back to the login screen after you connected. You mentioned that you have done to ensure that the disc is fine and the permissions are good. Those who are very advanced. I know how much I rely on my Mac so I'll be more than happy to help.

    With your computer is able to start properly in Mode safe, this indicates that there may be a third-party service that is causing problems. I have some articles for you to check.

    OS X El Capitan: If you have problems with startup items

    OS X El Capitan: login users & groups preferences pane items

    You can remove all items start and the login items, and then test to see if you can boot normally, if you can, you can add one item at a time and continue his tests to see how the origin of the problem.

    Take care!

  • my default calendar on IPhone and IPad has disappeared. I can't see it either on ICloud and do not save on my Mac Book. How can I get it back? Is it possible to return to a previous update in ICloud?

    My default calendar on the IPhone (and IPad) disappeared. I can't see it either on ICloud and make the back not my calendars on my Mac Book. How can I get it back? Is it possible to return to a previous update in ICloud and find?

    Go to iCloud.com using a computer, then settings. When loading this page, look down at left under Advanced and see if you can restore from there.

  • I was charged for my coffee game update, which I wasn't aware of. I do not accept to pay about $ 8 for only an update, this game in the first place was free. I want to ask for a return and I will delete the game

    I was charged for my coffee game update, which I wasn't aware of. I do not accept to pay about $ 8 for only an update, this game in the first place was free. I want to ask for a return and I will delete the game

    Apple or App developers read this forum. If you want a refund, contact the developer to the email address. It is to them that they will refund your or not.

Maybe you are looking for

  • OfficeJet 6500 Wireless: Lost after upgrade Windows 10 Scan function

    During the upgrade to Windows 7 to 10, I received a message that the printer drivers may not be installed correctly.  I uninstalled and reinstalled the full features of HP software for my wireless Officejet 6500 several times.  No apparent problem un

  • I imported bookmarks in Chrome, but all the links are bad

    I'm moving from Chrome to Mozilla to work. I have work of many associates of bookmarks. I exported the booksmarks of Chrome and put them on my desk. Then I opened organizing bookmarks on Mozilla and imported. They are there, but all the links are the

  • Went on the screen of the high round of colors

    All whites went blue and photos are exposed in red pixels. any ideas on how this can be corrected?

  • One of the two list boxes other work returns null.

    To the right,. I work with an earlier program not created by myself and I have a strange behavior in a list box.  There are two areas of list with the proper functioning and the other indicates a null value in the data.  When you look at the front pa

  • Error 1402 cound not open...

    When I try to download Adobe I get the error message below. I looked at other issues posted with the same problem and still cannot download. I am the administrator, the only one who uses this computer. I had a similar trouble download silverlight and