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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:40:53+00:00 2026-05-13T07:40:53+00:00

Which use of connection management is better while developing a windows based application which

  • 0

Which use of connection management is better while developing a windows based application which uses a Database as its data store? What about web-based applications?

  1. when user loads the first form of an application, the global
    connection opens and on closing the last form of the application
    the connection closes and disposes.
  2. for each form within the application, there is a local connection
    (form scope) and when user wants to perform an operation like
    insert, update, delete, search, … the application uses the
    connection and by unloading the form the connection also closes and
    disposes.
  3. for every operation within a form of an application, there is a
    local connection (procedure scope) and when user wants to perform
    an operation like insert, update, delete, search, … the
    application uses procedure connection and at the end of every
    procedure within the form, the connection also closes and disposes.
  • 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-13T07:40:53+00:00Added an answer on May 13, 2026 at 7:40 am

    Go with #3

    You should try to only ever keep connections open for just as long as is required.

    Also have a look at

    • Understanding Connection Pooling
    • SQL Server Connection Pooling
      (ADO.NET)

    Connecting to a database server
    typically consists of several
    time-consuming steps. A physical
    channel such as a socket or a named
    pipe must be established, the initial
    handshake with the server must occur,
    the connection string information must
    be parsed, the connection must be
    authenticated by the server, checks
    must be run for enlisting in the
    current transaction, and so on.

    In practice, most applications use
    only one or a few different
    configurations for connections. This
    means that during application
    execution, many identical connections
    will be repeatedly opened and closed.
    To minimize the cost of opening
    connections, ADO.NET uses an
    optimization technique called
    connection pooling.

    Connection pooling reduces the number
    of times that new connections must be
    opened. The pooler maintains ownership
    of the physical connection. It manages
    connections by keeping alive a set of
    active connections for each given
    connection configuration. Whenever a
    user calls Open on a connection, the
    pooler looks for an available
    connection in the pool. If a pooled
    connection is available, it returns it
    to the caller instead of opening a new
    connection. When the application calls
    Close on the connection, the pooler
    returns it to the pooled set of active
    connections instead of closing it.
    Once the connection is returned to the
    pool, it is ready to be reused on the
    next Open call.

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

Sidebar

Ask A Question

Stats

  • Questions 386k
  • Answers 386k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I'm not sure whether this can be done at all,… May 14, 2026 at 11:55 pm
  • Editorial Team
    Editorial Team added an answer is (§14.9.10 of the standard) generally uses isinst, but it… May 14, 2026 at 11:55 pm
  • Editorial Team
    Editorial Team added an answer Suns of Suckerfish teaches how to get there. (Example.) edit:… May 14, 2026 at 11:55 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.