Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. conscious perma-coupling

conscious perma-coupling

Scheduled Pinned Locked Moved The Weird and The Wonderful
database
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Duncan Edwards Jones
    wrote on last edited by
    #1

    Application startup creates a

    SqlConnection

    for each database it uses, and opens it, and this is then passed as a parameter from one module to the next for the lifetime of the application....to save the time opening and closing the connection.

    L B L 3 Replies Last reply
    0
    • D Duncan Edwards Jones

      Application startup creates a

      SqlConnection

      for each database it uses, and opens it, and this is then passed as a parameter from one module to the next for the lifetime of the application....to save the time opening and closing the connection.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See, I told you already. With smart programmers like this, we don't need connection pooling. :)

      1 Reply Last reply
      0
      • D Duncan Edwards Jones

        Application startup creates a

        SqlConnection

        for each database it uses, and opens it, and this is then passed as a parameter from one module to the next for the lifetime of the application....to save the time opening and closing the connection.

        B Offline
        B Offline
        BobJanova
        wrote on last edited by
        #3

        This is actually valid in certain, rather unusual circumstances (e.g. a networked database running an old engine or configured such that it doesn't pool connections from different processes). But it's almost guaranteed that the coder just didn't know what he was doing ...

        D 1 Reply Last reply
        0
        • B BobJanova

          This is actually valid in certain, rather unusual circumstances (e.g. a networked database running an old engine or configured such that it doesn't pool connections from different processes). But it's almost guaranteed that the coder just didn't know what he was doing ...

          D Offline
          D Offline
          Duncan Edwards Jones
          wrote on last edited by
          #4

          ..actually connection pooling is enabled and on (because we are using the ADO.NET client for SQL Server it is on by default and set to a pool size of 100 conenctions). The code is just not using it.

          1 Reply Last reply
          0
          • D Duncan Edwards Jones

            Application startup creates a

            SqlConnection

            for each database it uses, and opens it, and this is then passed as a parameter from one module to the next for the lifetime of the application....to save the time opening and closing the connection.

            L Offline
            L Offline
            Lutoslaw
            wrote on last edited by
            #5

            Duncan Edwards Jones wrote:

            Conscious perma-coupling for the lifetime

            Maybe an author of the idea couldn't find a proper woman, and wanted to make it up by designing a "couply" system... Maybe he should break up with Anna.avi and get merried. ;)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups