PL/SQL program not working when connect database via SqlNet

Hi,
This is a segment of a PL/SQL program before opening a cursor using input descriptor. It is working fine ( to get the value of unOutputCount ) without connect to a database via SqlNet, can anyone tell me why it is not working ( unOutputCount return 0)while connecting to a database via SqlNet and how to make it work without opening a cursor before DESCRIBE OUTPUT ...?
EXEC SQL ALLOCATE DESCRIPTOR GLOBAL 'input_111'
WITH MAX 100;
EXEC SQL ALLOCATE DESCRIPTOR GLOBAL 'output_111'
WITH MAX 100;
EXEC SQL PREPARE STMT1 FROM :psSqlStatement;
EXEC SQL DECLARE CURSOR1 CURSOR FOR STMT1;
EXEC SQL DESCRIBE INPUT STMT1
USING DESCRIPTOR GLOBAL 'input_111';
/* Get count of input parameters in statement */
EXEC SQL GET DESCRIPTOR GLOBAL 'input_111' :unInputCount = COUNT;
EXEC SQL DESCRIBE OUTPUT STMT1
USING DESCRIPTOR GLOBAL 'output_111';
/* Get count of output parameters in statement */
EXEC SQL GET DESCRIPTOR GLOBAL 'output_111'
:unOutputCount = COUNT;

Hi,
Welcome to Oracle OTN Forums!
I changed your code a little. I think this help you
CREATE OR REPLACE
PROCEDURE xx_test
IS
  v_pid VARCHAR2(100);
  v_cn  VARCHAR2(100);
  v_id  VARCHAR2(1000);
  v_val VARCHAR2(1000);
  CURSOR C1
  IS
    (SELECT product_id, 'PRODUCT_ID'  cn
        FROM product1 );
  BEGIN
    FOR V1 IN C1
    LOOP
      FETCH C1 INTO v_pid, v_cn;
      dbms_output.put_line('==== '||v_pid||'==== '||v_cn);
      EXECUTE IMMEDIATE
      'SELECT product_id, DECODE(COUNT (product_id),1,MAX (product_id))||'''||V_CN||''' as val
        FROM product1
       WHERE product_id =:a
       GROUP BY product_id)' INTO v_id, v_val USING v_pid;
      dbms_output.put_line('==== '||v_id||'==== '||v_val);
      EXECUTE IMMEDIATE 'UPDATE product2 SET '||v_cn||' = ' ||''''|| v_val ||''''|| ' WHERE product_id = :b' USING v_pid;
      dbms_output.put_line('++++ '||v_cn||'++++ '||v_val||'++++ '||v_pid);
    END LOOP;
  END xx_test;

Similar Messages

  • Auto Lock not working when connected to Macbook

    Ive had my ipod for about a week and I thought auto-lock was working even when the ipod is connected to my computer.
    But I just realized that the auto-lock is not working when it is connected to the computer.
    Is this normal?
    Also when I set the brightness to the lowest setting, the screen slightly flickers intermittently.
    Is this normal too?
    Thanks

    Do you have more than one IDM Server running in your environment? When you are debugging a WF on server A and the scheduler decides (usually after an approval step) to continue running the WF on server B, your debugger connecting to server A wouldnt stop at the breakpoint.
    Can you make the debugger stop on e.g. the "start" or very first Activity in your wf? Right after launching it from the form.

  • Audio not working when connected to HDTV

    I connected my MacBook Pro to my Samsung HDTV LN40D503F6F and also connected an HDMI cable to the TV using Apple mini DVI cable. I tried connecting to both HDMI/DVI 1 and HDMI 2. Video works fine when connected to both the HDMI ports, but the audio didnt work. I also purchased an a 3.5 mm audio to RCA cable and tried switichin between both the HDMI ports but still it is not working. Any solution would be great. Thanks !!!

    Hi:
    While trying to help you, I was looking along the same lines as you were (I assume).
    I did a search by the IDT 92HD73E audio codec and all I could find were drivers for system boards with Intel processors such as the driver you tried unsuccessfully.
    I have finally found a W8.1 driver for that codec from a desktop PC with an AMD processor and chipset.
    See if this one works...
    http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=cp-134120-1&cc=us&dlc=en&lc=en...

  • Program not working when transfered to a mobilphone.

    Hi all.
    I have made a program that should be able to send a message over bluetooth.
    The program works when I use the simulator, but it cannot find any other devices, when I transfer it to the phone.
    Does any of you know if there are any special things that I should do to allow it to find other bluetooth devices on my phone.
    Hope you can help med here.
    Thx in advance.
    Kind regards Michael.

    Is the simulator correctly set to represent the phone you're trying to deploy on?
    Not all Java-enabled phones implement all Java functionality -- you should check to see that the phone implements the correct JSR (I believe it's JSR-82).

  • Maps not working when connected to local-only WiFi network

    Just FYI, while I had my iPhone connected via WiFi to the network my Time Capsule created but with the TC not connected to the internet (cable modem down), Maps (on the iPhone) refused to load any new content. Switched off WiFi, everything worked again.
    It could be that any app (not just Maps) that required internet connectivity would not work in such a situation. I'll test that tonight.

        trimandjen2
    Sorry to hear about any trouble with your picture messages! Let's get everything back up and running for you. Is mobile data still turned on when you're connected to WiFi? If so, can you try using the Google Hangouts application for your messaging instead? I'd like to test if this will allow you to receive picture messages even when on WiFi. Keep us posted!
    RuthW_VZW
    Follow us on twitter @VZWSupport

  • HT2844 My front headphone jack does not work when connecting a head phone to a new mac pro desktop computer.  The sound still comes from the speakers.  Any solutions?

    The front headphone jack on my new mac pro desktop computer does not transmit sound when connecting a headphone or ear buds.  The sound still comes from the speakers and is not redirected to the head phone.  The port has never worked.  Any solutions?

    okay, try option-clicking on the speaker icon on the top of your screen. That should bring up a list of sound output options. including headphone. You could try messing around with Audio MIDI. It may be possible that the thing is still stuck inside the headphone jack. Careful use of a toothpick may get it unstuck. I dunno, I've never had a problem with the headphone jack. If all else fails, call Apple or take 'er in for an appointment
    JB

  • Find My Phone not working when connected to international service provider

    I recently moved from the US to Switzerland and changed my SIM card from one of Verizon's to one of Orange's (Orange is a popular provider in Switzerland). Unfortunately, the Find My Phone feature is now not working, whether I'm connected to WiFi or using data. Does anyone know if the feature only works in the States?

    Find My Phone only requires an Internet connection, either WiFi or 3G. Have you tried turning Find My Phone off, wait about 30 seconds or so, then turning it back on?
    Also, read here:
    http://support.apple.com/kb/TS4006

  • IChat AV not working when connecting wirelessly thru Netgear router

    Ok, I have read nearly EVERY forum out there about this issue, and I have tried nearly everything. I even called Apple. Noone can seem to figure out what the deal is.
    I have a Netgear WGR614 v5, and it is connected to a modem that I got from RoadRunner (Time Warner Cable).
    My cousin, who has a Mac identical to mine, is set up in the same fashion with a Netgear router.
    Neither of us can get a video connection using iChat. When we click the Accept button, it says "Connecting to ...." and then we both get an error that basically says there was a "communication error".
    I was informed of an Apple test address that I could test it with. AIM username is appleu3test03. I added it to my iChat buddy list, and clicked on the camera icon, and voila! It connected and I get an iPhone video (which is what is supposed to happen)
    So, what EXACTLY is that supposed to tell me???? The Apple test site says that means there is no problem with my connection, but that the issue is on my end somewhere....but I don't understand how that can be.
    Anyway, I don't have ANY firewalls on, and it works when I am connected directly with an Ethernet cable.
    PLEASE!!! HELP!!
    Thanks
    Cynthia

    Hi arvideo,
    OK IS the UPnP on in this device ?
    And no Port Forwarding or Services set ?
    IS it the only device connected to the internet ? (is there another router or a modem ?)
    1:18 PM Sunday; August 12, 2007

  • Mail not working when connected to a new network

    Whenever I connect to the network at work I can't send mail. I can receive mail though. I can't use my airport at work. Could this be the problem?
    Thank You
    Tamara

    Unless your employer has a wireless router and wireless network, you can't use Airport when at work.
    Assuming you have a business email account provided by your employer, you can't send mail with your business email account either when connected to your employer's network and internet access at work?

  • Nano6th-Speakers not working when connecting to Nano

    My new Ipod Nano(6th Gen) does not work with the speakers i have that i had used with my Ipod Nano (1st gen). Speakers are in working condition-Anyone know why? Does the my new nano(6thGen) require different speakers?

    2 days ago, we have added 4th node to the existing 3node RAC. Is that given any issues.
    below are the things i checked.
    $->srvctl status scan
    SCAN VIP scan1 is enabled
    SCAN VIP scan1 is running on node qysqalccoredb01
    SCAN VIP scan2 is enabled
    SCAN VIP scan2 is running on node qysqalccoredb03
    SCAN VIP scan3 is enabled
    SCAN VIP scan3 is running on node qysqalccoredb02
    $->srvctl status scan_listener
    SCAN Listener LISTENER_SCAN1 is enabled
    SCAN listener LISTENER_SCAN1 is running on node qysqalccoredb01
    SCAN Listener LISTENER_SCAN2 is enabled
    SCAN listener LISTENER_SCAN2 is running on node qysqalccoredb03
    SCAN Listener LISTENER_SCAN3 is enabled
    SCAN listener LISTENER_SCAN3 is running on node qysqalccoredb02
    why it is not running on 4th node. Please let give some ideas.

  • Touch Screen not working when plugged in via usb to laptop

    I am hoping someone can help me figure out what to do because I have run out of ideas... When I plug the phone into my laptop via the USB cable provided with the phone (2006 Dell 1710 Inspiron, Windows Vista) the touch screen does not work. The phone is functioning but I just can't use the touch screen to do anything, more specifically, I want to connect as a mass storage device so I can transfer files, music, pictures, etc.
    I have downloaded the drives, installed and reinstalled the drivers, soft rest, used all 5 USB ports on the laptop and made sure the ports were up to date for drivers and software on the laptop. Still the screen won't work when plugged in.
    My next step was to try it on a different computer so I used an HP desktop running Windows 7. Downloaded the drivers when prompted and low and behold the screen worked just fine when plugged in. It also works when plugged into my computer at work.
    Considering the phone works fine on another computer I am guessing it might be the USB ports on my laptop or the software associated with it.
    If anyone can help I would greatly appreciate it. Thank you!

    I would definitely agree with you, Funkytown.  If we know the phone works properly with two other computers and you've run through all the troubleshooting (awesome job!), then we can determine there is something with the computer that is causing the issue.
    Thank you!

  • Out.println not works after connecting database

    Hi,
    I am not able to view the output after connecting the database. If i change the output bfr connect it is working fine.
    any idea?
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    import java.util.*;
    public class Login3 extends HttpServlet
    public void doGet(HttpServletRequest req ,HttpServletResponse res)
    throws IOException,ServletException
    Connection conn = null;
    Statement st;
    ResultSet rs1,rs2;
    Statement select = null;
    ResultSet result = null;
    try{
    ResourceBundle config = ResourceBundle.getBundle("config");
    String dbserver = config.getString("dbserver");
    res.setContentType("text/html");
    PrintWriter out = res.getWriter();
    Class.forName("org.gjt.mm.mysql.Driver");
    conn = DriverManager.getConnection("jdbc:mysql://192.168.1.20/test?user=saravanan&password=123456");
    out.println("<html><body>hai</body></html>");
    }catch(Exception e){e.printStackTrace();}
    }

    hi,
    Thanks for ur reply. I didn't get any exception or error in the log files
    Regards,
    Saravanan

  • Hyper-V vSwitch external connection not working when connected to 100mb switchport

    I added 2 new servers to my existing Hyper-v 2012 server core failover cluster and there are many physical network connections on these servers.  One of the network connections on the new servers goes to a switch that doesn't have any additional 1gb
    connections and only has 100mb ports available.  The existing servers are connected to 1gb ports and they work fine.  The new servers are connected to the 100mb ports and when the host is setup with an IP on that network, I can ping other devices
    just fine but when I setup a vswitch connected to this external network adapter and share it with the host, I can ping between a Guest VM and the host but I can't ping on the external network.  So it appears that a Hyper-v vswitch doesn't autonegotiate
    with an external network connection that is set for autonegotiate on the switch but limited to 100mb.  I switch the cables between a server that ha 1gb connection put it into the new server and it communicates just fine but the old server won't communicate
    on 100mb port.
    Does anyone know how to setup the vswitch external network connection so that it will communicate on a 100mb external network?

    Hi Sir,
    >>The new servers are connected to the 100mb ports and when the host is setup with an IP on that network, I can ping other devices just fine but when I setup a vswitch connected to this external network adapter and share it with the host, I can ping
    between a Guest VM and the host but I can't ping on the external network. 
    First , please try to test (I assume that there is no vlan settings in your LAN):
    1. create an external virtual switch and click "Allow management operating system to share ... " without Vlan setting
    2. do not connect any VM to this external virtual switch just Host's virtual NIC
    3. try to access other computer in the LAN
    Any further information please feel free to let us know .
    In addition , please check if there is any configuration on that 100Mb switch port .
    Best Regards,
    Elton Ji
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] .

  • MMS not working when connected to wifi

    My problem is similar to this recent post about the S5:
    MMS Problems with Samsung S5
    It started this morning (Wednesday, 6/11/14). I have sent and received MMS messages seamlessly until about 8:00 this morning. Now, if I am connected to a wifi network, but do also have data enabled, I cannot send or receive MMS messages. When sending, it just hangs and doesn't send until I disable wifi. When receiving, I get a message wanting me to click "download", but when I do, nothing happens. Turning off wifi makes both messages go through immediately.
    I understand that MMS messages do not go through wifi, but, as I said, until this morning they could go over the data network as needed even when I was connected to a wifi network. The change was sudden, and I'm not aware of anything that changed with my wifi connection or my phone, though my apps do typically auto-update, and I don't know which, if any, may have auto-updated this morning.

        trimandjen2
    Sorry to hear about any trouble with your picture messages! Let's get everything back up and running for you. Is mobile data still turned on when you're connected to WiFi? If so, can you try using the Google Hangouts application for your messaging instead? I'd like to test if this will allow you to receive picture messages even when on WiFi. Keep us posted!
    RuthW_VZW
    Follow us on twitter @VZWSupport

  • Apple USB Keyboard not working when connected in Macbook PRO retina

    I have this problem. When I connect my new Apple usb keyboard directly to the laptop it does work. Is there any way to solve this problem?
    BR

    I just did the latest update and my Apple USB keyboard stopped working. The keyboard works fine with other computers and other keyboards work with my Macbook.
    The keyboard ships with a three foot extension cable. I plugged the keyboard into the Macbook with this cable and now it's working fine. I think it has something to do with the USB port being 3.0. A USB hub may also solve the issue.
    JD

Maybe you are looking for

  • Setting list view in calendar

    I was very disappointed when I lost "list view" for Calendar on IOS 7.0.  But when I upgraded to IOS 7.1, I noticed the old "list view" was back for Calendar.  A welcome change.  But now that has changed again, I get what is called "combo view", a ha

  • Where did you put my bookmarks - I used to have a button for them

    I used to have a little bookmark button on the top of the page and now it's gone. I have work to do and don't have time to figure out all the new stuff right now. How do I get my nice, organized button back?

  • Java publishing framework using Weblogic personalization

    Hi All, Has anyone used the Weblogic personalization server/portal or a different Weblogic product as a publishing framework. We want to design a publishing system in which we can quickly create templates for new type of content on the website, and p

  • Migrate mail from old mac

    Is there a way to migrate my mail, Earthlink POP? The Migration Assistant just seems to move all applications and I don't want that. Thanks.

  • Restore iChat

    I'm running version 2.1.3. When I set up iChat recently, I mistakenly chose AIM Screen Name as login type and now, as my screen name is really a .mac it won't allow me to connect. Is there any way to restore iChat so I can run the initial setup again