Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4073338
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:00:24+00:00 2026-05-20T17:00:24+00:00

Hey all when i use TOAD to update a table all works just fine

  • 0

Hey all when i use TOAD to update a table all works just fine when using this query:

Update CSR.CSR_EAI_SOURCE ces 
        Set (STATUS_CODE, COMPLETE_DATE, DATA) =
            (SELECT 'ERROR', '', REPLACE(REPLACE(c.Data, '…', ' '), '’','''') 
             FROM CSR.CSR_EAI_SOURCE C
             WHERE c.EID = ces.EID
               AND c.STATUS_CODE = 'ERROR')
        WHERE EXISTS (SELECT 1
                       FROM CSR.CSR_EAI_SOURCE C
                       WHERE c.EID = ces.EID
                         AND c.STATUS_CODE = 'ERROR');

However, once i try doing the same thing in my VB.net program using this code:

 Dim OracleCommand As New OracleCommand()
 Dim ra As Integer

 OracleCommand = New OracleCommand("UPDATE   CSR.CSR_EAI_SOURCE ces " & _
                                      "SET      (STATUS_CODE, COMPLETE_DATE, DATA) = " & _
                                                "(SELECT    'ERROR', '', REPLACE(REPLACE(c.Data, '…', ' ' ), '’','''') " & _
                                                "FROM       CSR.CSR_EAI_SOURCE C " & _
                                                "WHERE      (c.EID = ces.EID) " & _
                                                "AND        c.STATUS_CODE = 'ERROR') " & _
                                      "WHERE    EXISTS (SELECT 1 " & _
                                      "FROM     CSR.CSR_EAI_SOURCE C " & _
                                      "WHERE    (c.EID = ces.EID) " & _
                                      "AND      c.STATUS_CODE = 'ERROR')", OracleConnection)

  Try
      ra = OracleCommand.ExecuteNonQuery()
      OracleConnection.Close()
      MsgBox("done")
  Catch ex As Exception
      MsgBox("ERROR: " & Err.Description & " " & Err.Number)
      OracleConnection.Close()
  End Try

It stays on the ra = OracleCommand.ExecuteNonQuery() continuously until i get the error

The CLR has been unable to transition from COM context 0x3327fa8 to COM context 0x3328118 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.

What could i do in order to get this working within VB.net since it works just fine in TOAD when running that same query?

Thanks!

David

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T17:00:24+00:00Added an answer on May 20, 2026 at 5:00 pm

    you can also turn off that ContextSwitchDeadlock was detected exception:

    To avoid these error popups from
    appearing, select Exceptions from the
    Debug menu from Visual Studio window
    and in the Exception Dialog box select
    the Managed Debugging Assistants
    Exception Node. Then select
    ContextSwitchDeadlock and remove the
    select from Thrown column

    from http://dotnetdud.blogspot.com/2009/01/clr-has-been-unable-to-transition-from.html

    EDIT:Check for Locks

    SELECT LPAD(' ',DECODE(l.xidusn,0,3,0)) || l.oracle_username "User Name",
    o.owner, o.object_name, o.object_type
    FROM v$locked_object l, dba_objects o
    WHERE l.object_id = o.object_id
    ORDER BY o.object_id, 1 desc;
    

    do note you will need ability to see dba_objects as well as v$locked_object (pulled this from here)

    and check out this article
    http://www.orafaq.com/node/854

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all, I'm using this colorpicker ( http://www.eyecon.ro/colorpicker ) and am trying to capture
Hey all, I am looking for a way to query my database table only
Hey all, my Computational Science course this semester is entirely in Java. I was
Hey all. We're sending quite a few emails (around 23k) using IIS6 SMTP service
Hey all, I'm pulling my hair out on this one. I've checked all my
Hey all. I have a server written in java using the ServerSocket and Socket
Hey All, I currently use Google's API to include jQuery into my sites like
Hey all, i want to use a regular expression to match a word with
Hey all, I'm just wondering if it is possible to get the name of
Hey all, I've been messing around with this awesome library on my *nix box,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.