Connection remains opened even after calling conn.close

i have a need to copy records from one table in a database (say db1) to another table in another database(say db2). I open connection to both databases, and get a Recordset (say rs1) by executing a query that contains all rows that i have to insert in the database db2. Next i get an empty recordset(rs2) on the table in the database db2 (with locktype batchoptimistic, clientside cursor). i loop on rs1 and for each row in rs1 i insert a row in rs2 and copy the fields. after all rows are done, i delete the rows from db2 that will be affected and do an updatebatch on rs2. then i close the recordsets and the connections
everything works fine except that the connection with the db2 is not getting closed, neither is it throwing any exception. when i comment the updateBatch code the connection closes normally.
can anyone please help me out, where am i going wrong.
thanks
Vijay Sharma

Hi,
There is one more thing that I want to add to the above question. After calling conn.close() I checked the status of the connection and it was not 'OPEN' but when I checked session information through DBA studio it was showing one connection. I enabled trace of Oracle provider for OLE DB. Trace showed that two sessions were opened but only one session was closed.
Thanks,
Vijay

Similar Messages

  • Black window remains open even after closing the window programatically

    I have an application which has multiple windows. From mainwindow button click event I am closing the child form of the application. The child window is opened after a successful socket, serial or gateway connection attempt, after which the application
    do work with some threads and while clicking on a button on mainwindow I am closing this child window after disconnecting the respective connection mode. But after the close event the child window background gets black and it remains open unless and until
    I just do a minimize and maximize the application. Please help me on this to get this issue fixed.

    Well the details are rather going to depend on what it's doing.
    It's a very open ended question really.
    But...
    Your options include.
    Background worker.
    https://msdn.microsoft.com/en-us/library/cc221403(v=vs.95).aspx
    DIspatcherTimer
    https://msdn.microsoft.com/en-us/library/system.windows.threading.dispatchertimer(v=vs.110).aspx
    Async Await
    https://msdn.microsoft.com/en-us/library/hh191443.aspx
    Tasks
    Task.Factory.StartNew(() => { Dosomething(); });
    Or just a plain thread
    using System.Threading;
    new Thread(() =>
    Thread.CurrentThread.IsBackground = true;
    // DoSomething();
    }).Start();
    Where DoSomething is a method.
    You can also have inline code of course instead of a method.
    Whilst on a different thread to the UI you can't update UI objects.
    You'll get a thread affinity error message if you try.
    That means you either return your results to the ui thread and process them there ( particularly convenient with async await ).
    Or you update something which doesn't have thread affinity.
    An observablecollection bound to an itemssource doesn't have thread affinity eg.
    You do need to raise property changed at the end of your processing with that option because it notifies collectionchanged on the wrong thread and the UI won't know it changed.
    Or you can dispathcher.begininvoke to get back to the UI thread.
    All depends what you're doing but hopefully one of those options there will suit you.
    Hope that helps.
    Recent Technet articles:
    Property List Editing ;  
    Dynamic XAML

  • When ever I customize the toolbar the open new tab sign that is the + sign near the lastly opened tab in the tab bar disappears and it remains so even after restarting Firefox.

    When ever I customize the toolbar, the open new tab sign that is the + sign near the lastly opened tab in the tab bar disappears and it remains so even after restarting Firefox. This happens only after updating to the new version 4.0.1 it never happened in the older versions 3.x.xx- checked it thrice. Thought it could be a bug and i didn't know where to report also don't have time and patience to search for the appropriate page so i'm reporting here for improving my favorite browser.

    You can find the New Tab button showing as a '+' on the Tab bar.<br />
    You can open the Customize window and drag the New Tab button from the Tab bar on another toolbar and it will become a regular toolbar button like the New Tab button that you have in Firefox 3 versions.<br />
    If you want the New Tab button at the far right end of the Tab bar then place a flexible to the left of it.<br />
    *New tab toolbar button: https://addons.mozilla.org/firefox/addon/new-tab-toolbar-button/

  • XA connections remain open

    We are using Oracle 9.0.2, JDBC thin driver 9.0.2 and Weblogic 6.1 We create XA
    connections (without pooling) directly from the middle-tier (Weblogic server)
    to the database. We have noticed that these XA connections remain open for an
    arbitrary amount of time after the connection was closed by the middle-tier. Has
    anyone experienced similar problem? Does anyone know what can keep an XA connection
    open after the connection.close() has been issued.
    Thanks in advance, Eugenia

    Eugenia,
    According to the WLS 7.0 release notes in the e-docs site:
    "WebLogic Server applications that use distributed transactions with Oracle
    Server 9.2.0.x are experiencing problems with the Oracle thin driver
    9.2.0.x. For such applications, BEA recommends against using Oracle thin
    driver 9.2.0.x at this time. Instead, use a 9.0.1.X driver, where X is 3 or
    higher. "
    Hope this helps.
    "Eugenia" <[email protected]> wrote in message
    news:[email protected]..
    >
    We are using Oracle 9.0.2, JDBC thin driver 9.0.2 and Weblogic 6.1 Wecreate XA
    connections (without pooling) directly from the middle-tier (Weblogicserver)
    to the database. We have noticed that these XA connections remain open foran
    arbitrary amount of time after the connection was closed by themiddle-tier. Has
    anyone experienced similar problem? Does anyone know what can keep an XAconnection
    open after the connection.close() has been issued.
    Thanks in advance, Eugenia

  • I downloaded ios7 and now some apps won't open even after resetting them. Don't won't to lose my info by deleting them and starting over. What to do?

    I downloaded ios7 and now some apps won't open even after resetting don't won't to lose my info by deleting and starting over.. What to do?

    Try close all inactive apps
    1. Double tap the home button to bring up the multi-tasking view
    2. Swipe up on the screenshot of the app you want to exit.
    3. The app will fly off the screen

  • When i forgot my password and made attempts to open IPAD it got disabled and not able to open even after i have changed my password.

    I am not able to open my ipad when forgot password and made several attempts to open it .The message " iPAD is disabled..Connect to itunes" appers.It is not opening even after i changed the password.Need support.

    Try and force iPad into Recovery Mode:
    1. Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to turn off.
    If you cannot turn off the device using the slider, press and hold the Sleep/Wake and Home buttons at the same time. When the device turns off, release the Sleep/Wake and Home buttons.
    2. Connect USB cable to computer, leave the other end alone
    3. Press and hold the Home button down and connect the docking end of cable to iPad
    4. Continue holding the Home button until you see the "Connect To iTune" screen
    5. Release the Home button
    6. Open iTune
    7. You should see "iTunes has detected an iPad in recovery mode"
    8. Use iTune to restore iPad
    Note: You need to be patient and repeat the above many times to recover your iPad

  • I had original iPhoto app from 2007, but in the last year it stopped working seemingly out of nowhere.  Now I just installed iPhoto 9.5.1 but it won't open even after downloading the iPhoto Library Updater.  My pictures are lost in the abyss.

    I had original iPhoto app from 2007 or 2008, but in the last year it stopped working seemingly out of nowhere.  Now I just installed iPhoto 9.5.1 but it won't open even after downloading the iPhoto Library Updater.  My pictures are lost in the abyss.
    I'm using OS Extended 10.9.5.  I don't know what the original version of iPhoto was.

    I just installed iPhoto 9.5.1 but it won't open even after downloading the iPhoto Library Updater
    Have you run the iPhoto Library Upgrader? You need to direct it to the location of your old iPhoto Library by clicking the "Choose Library" button in the lower right corner of the panel you are seeing when the upgrade starts.

  • HT5037 Iphoto Still wont open even after installed the prepare file

    Still wont open even after installed the prepare file. I haven't felt this frostation since window 5 

    Go to Applications /Utilities. Find the upgrader app there. Double click on it to run it.
    I haven't felt this frostation since window 5
    Sorry, no idea what this means.

  • Tried restoring iPad to prepare it to sell, encountered error now iTunes won't recognize.  The iPad just shows the connect to iTunes even after restarting.

    I tried restoring iPad1 to prepare it to sell, encountered error during the restore.  iTunes dispalyed a message that there had been an error.  My iPad1 is just showing the image to connect to iTunes, even after i try restarting the iPad1.  I've also restarted my PC and iTunes will not recognize the iPad1.
    iTunes is and will recognize my new iPad3 just fine.
    How do I get my iPad1 to come back to life?
    Thanks!

    No luck.  The article says to press and hold the home button, then plug in the usb cable.  When i do that, I still just have the connect to itunes image on the iPad, and iTunes is not recognizing the iPad.

  • The Outlook links do not connect to Firefox even after setting the customize option in Default Programs. Please help.

    The''' Outlook links do not connect to Firefox '''even after setting the customize option in Default Programs. Please help.

    Message to Toad-Hall
    Thank you, for that. To be sure, I tried your suggestion, and selected "System Proxy" as the choice, for Thunderbird and Firefox. Rebooted, and looked at the outcome.. NO Joy.. :-(
    I believe that I shall send the output of the Error Log in my next post. Perhaps someone can point me in the right direction after looking at the Error.log.
    Thank you...Toad Hall. If you think of something else to try, I am ALL ears.. I shall keep trying..

  • HT5664 Just bought a new IMAC. Cant get the iPhoto to open even after apparently loading the library upgraded. Ideas?

    Just bought a new IMAC. Cant get the iPhoto to open even after apparently loading the library upgraded. Ideas?

    Did you install and RUN the iPhoto Library Upgrader on your library?
    OT

  • Calling conn.close() not getting any response

    Hi All,
    I am using ActiveMQ
    I am facing a unique issue, my code calls conn.close() method. But it didnt get any response fro 2 days, I think at least I should get a time out exception, isnt it?
    To give you more details my applicaiton which calls this close() is in one network (DMZ) and activemq is running on different (internal) network.
    Can somebody please reply ASAP, as I am not getting any clue to resolve this.
    Thanks and Regards
    Raaghu.K

    The SAP XML Parser was not able to parse the reponse. So - I had to read the data on my own.

  • App will not open even after reinstallation

    How do I resolve this?  Reinstalled multiple times, tried shuttting iPad down, is it a settings issue??  Running iOS 5.1.1 still, is that the issue?

    I'm sorry to hear that you have trouble running
    PS Touch.  Please try to install via iTunes. This normaly helps.
    -Guido
    Am 02.02.2013 um 06:34 schrieb "seankelleher" <[email protected]<mailto:[email protected]>>:
    Re: App will not open even after reinstallation
    created by seankelleher<http://forums.adobe.com/people/seankelleher> in Adobe Photoshop Touch - View the full discussion<http://forums.adobe.com/message/5041972#5041972

  • My ipod will not open even after following instructions online

    my ipod will not open even after following instructions online

    Do you mean you can't unlock it?
    We have no way of knowing exactly which online instructions you may have tried.
    Apple - Support - iPod touch - iPod touch Troubleshooting Assistant
    iPod touch: Hardware troubleshooting

  • PSE 6 will not connect to internet even after reinstall

    PSE 6 will not connect to internet even after reinstall

    Hi,
    Help at this link for ...
    Troubleshooting Wi Fi Networks & Connections
    Carolyn  

Maybe you are looking for

  • Mail Crashing on Open

    I can't open mail, it immediately crashes. I did some cleaning up of my iCal yesterday which may have something to do with it. I've deleted all the "to-do" items I created. I've synced back and forth and switched syncing to manual. I'm about ready to

  • Unable to connect copied vhd files to VM Hyper-v high availability cluster.

    Hi I have my VMs VHD files stored on my SAN  and I have a copied one of the LUNs containing a vhd file which I have then exported to the shared storage of the hyper-V cluster which is just like and other VHD. The problem comes when trying to connect

  • Change Color of Dates in Calendar

    This is a follow-up question to the following thread: http://discussions.apple.com/thread.jspa?threadID=1175451&tstart=208 The original question from that thread was never answered and I was having the same problem. Some of the big number dates in my

  • NiConnect Unsuccessful, Communication error, CPI-C function: CMINIT

    Hello, NiConnect Unsuccessful, Return Code: -0012                    > Host: 10.4.0.34                                             > Service: sapgw00                                            Communication error, CPIC return code 020, SAP return cod

  • Hello everyone! arrange photos issue!

    i'd like to ask if there is a way to arrange all my photos in iphoto without dublicates and delete the latter from any other destination for instance i use lightroom.the problem is that my mac is full of the same photos from three programs aperture l