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 8655973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:09:54+00:00 2026-06-12T15:09:54+00:00

In my application to connect to Orace database I always create a new connection,

  • 0

In my application to connect to Orace database I always create a new connection, open it, execute OracleCommands and finally close it afterwards. Recently I thought implementing a static connection would be a better idea. Say I have a static connection that I can access from anywhere. Each time I need to connect to database I can check for the state of my static connection,open it if it’s not already open and close it afterwards. Do you think this would be beneficial or there are more disadvantages?

  • 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-12T15:09:55+00:00Added an answer on June 12, 2026 at 3:09 pm

    I’m assuming you’re using ODBC here because you haven’t stated exactly and it’s normally used…

    No, you should use a new connection each time, this is the standard practise that Microsoft recommend. If you’re using ODBC etc then windows manages these connections, caching them for re-use and it makes it easier to manage the lifetime of things.

    If you use a static connection, you might dispose of it to early or have closed it without knowing. In general it’s just a bit more awkward and a premature optimization.

    To deploy high-performance applications, you frequently must use
    connection pooling. However, when you use the .NET Framework Data
    Provider for ODBC, you do not have to enable connection pooling
    because the provider manages this automatically.

    See OdbcConnection for more info.

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

Sidebar

Related Questions

My .NET application tries to connect to an Oracle database, but the connection fails
i wrote program to connect oracle database 11g for my android application to store
I have a Swing application that connect directly to MySql Database for user authentication.
I want to develop an application to connect to a PostgreSQL Database, I want
I'm trying to connect my application with an Oracle database using NHIBERNATE 3.1.0.4000 version
I'm trying to connect my application to my database. I does not give a
I am doing multimedia application. my issue is i want to connect oracle database
Im using hibernate to connect to a oracle database in my application. When the
I use an Oracle database in a PHP application. A user tries to connect
I am using attempting to create a connection to an Oracle database via entity

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.