just-in-time (JIT) debugging error System.InvalidOperationException

Posted on 2009-04-29
Last Modified: 2012-06-21
Hi Expert,
I develop an application to masked the blob field data in a database.
It masked the field record by record.
If the number of records is ok example 1 million, everything run fine.
But after one million, sometimes it will prompt out error below.
Why it happend? and only occurred sometimes

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: ConnectionString may not be set on an
open connection.
   at System.Data.OracleClient.OracleConnection.set_ConnectionString(String
Question by:yuching
    LVL 6

    Accepted Solution

    It seems that somehow you're not closing the database connection under certain conditions. Without code to look at, I can't offer a much more comprehensive solution.
    LVL 6

    Assisted Solution

    The answer is to make sure you do a .Close() and a .Dispose() before your code exits.

    Also, all data queries should be wrapped in "using" statements.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now