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

  • Home
  • SEARCH
  • 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 7738381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:14:57+00:00 2026-06-01T08:14:57+00:00

I have some code that uses ODP.Net using (OracleConnection connection = new OracleConnection(connectionString)) {

  • 0

I have some code that uses ODP.Net

using (OracleConnection connection = new OracleConnection(connectionString))
{
  connection.Open();
  boxCommand = new OracleCommand(sql, connection);

  OracleDataAdapter boxAdapter = new OracleDataAdapter(boxCommand);
  DataTable boxTable = new DataTable();        

  boxAdapter.Fill(boxTable);
}

I then get an error below on a production server. The test server is fine.

Error Image

I don’t understand as its complaining about a connection not being open but if there was a problem it should occur at the point my Open is called not on the Fill. Also I thought Fill was supposed to open the connection anyway.

Can anyone suggest what might be going on?

UPDATE: From the comments I tried adding this but same problem:

using (OracleConnection connection = new OracleConnection(connectionString))
{
  connection.Open();
  while(connection.State != ConnectionState.Open)
  {
     connection.Close();
     connection.Open();
  }
  boxCommand = new OracleCommand(sql, connection);

  OracleDataAdapter boxAdapter = new OracleDataAdapter(boxCommand);
  DataTable boxTable = new DataTable();        

  boxAdapter.Fill(boxTable);
}

UPDATE 2 : I have added logging and the Validate Connection = true to the connection string and I know the connection state is open, the box command was done, the adapter created and the table created, it definitely errors on the Fill

  • 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-06-01T08:14:59+00:00Added an answer on June 1, 2026 at 8:14 am

    Can you try installing the latest version of ODP.Net and see if you still have the problem? You should be able to run latest ODP.Net even against older Oracle DBs (10g in your case).

    EDIT:
    Since you’re restricted to a specific ODP.net version, here are some other things to try:

    • Make sure the proper Oracle folders are at the beginning of your system path. For example, I have the Oracle folders at the beginning of my path, like this (I have ODP.net installed in c:\oracle\ora11g and I also have Oracle 10g Express Edition installed, but note that the ODP.net folders are first:

      c:\oracle\ora11g\product\11.1.0\client_1;c:\oracle\ora11g\product\11.1.0\client_1\bin;C:\oracle\ora10g\bin;

      I’ve seen situations where Oracle does weird things and won’t work properly if the path isn’t correct.

    • Try reinstalling the specific ODP.net version you are using. This should clean things up and hopefully resolve your issue.

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

Sidebar

Related Questions

I have some code that uses Open XML to open up a .docx file,
I'm using NetBeans as my IDE. Whenever I have some code that uses another
Currently I have some legacy ASP.NET 2.0 code that uses the ASP Xml web
I have some code that uses a form.submit() to open up another window when
Hi I have some code that uses block RandomAccessFile file = new RandomAccessFile(some file,
I have some C# code that uses some constructs specific to .NET 3.5. When
I'm using Grails 1.3.7. I have some code that uses the built-in base64Encode function
I have some code that uses the shared gateway pattern to implement an inversion
I have some code that uses the Oracle function add_months to increment a Date
I have some Java code that uses curly braces in two ways // Curly

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.