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. Database & SysAdmin
  3. Database
  4. About ADO Connection ?

About ADO Connection ?

Scheduled Pinned Locked Moved Database
question
9 Posts 4 Posters 11 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hello ! Which is better ? *** Create one ADOConnection at start point, and use it globally in program or *** Create an ADOConnection whenever and everywhere needed :confused: tanks ;)

    G C 2 Replies Last reply
    0
    • L Lost User

      Hello ! Which is better ? *** Create one ADOConnection at start point, and use it globally in program or *** Create an ADOConnection whenever and everywhere needed :confused: tanks ;)

      G Offline
      G Offline
      Gerald Schwab
      wrote on last edited by
      #2

      Create an ADOConnection whenever it's needed.

      M 1 Reply Last reply
      0
      • L Lost User

        Hello ! Which is better ? *** Create one ADOConnection at start point, and use it globally in program or *** Create an ADOConnection whenever and everywhere needed :confused: tanks ;)

        C Offline
        C Offline
        Carlos Antollini
        wrote on last edited by
        #3

        Is better to use the adoconnection like a global variable for your application, but you must open the adoconnection when you need, and leaving that connection open, for future use, and closing the connection when you close the Applictaion. But if your applictation need to use the connection every a long time, is better open the connection every time that you needm, but always leaving the connection like a global function. Cheers.... Carlos Antollini.

        M 1 Reply Last reply
        0
        • G Gerald Schwab

          Create an ADOConnection whenever it's needed.

          M Offline
          M Offline
          Mehrdad
          wrote on last edited by
          #4

          Hello Gerald Schwab ... ;) your answer is good!, but Creating an ADOConnection whenever it's need, may slow down my application, isn't it ? tanks!

          1 Reply Last reply
          0
          • C Carlos Antollini

            Is better to use the adoconnection like a global variable for your application, but you must open the adoconnection when you need, and leaving that connection open, for future use, and closing the connection when you close the Applictaion. But if your applictation need to use the connection every a long time, is better open the connection every time that you needm, but always leaving the connection like a global function. Cheers.... Carlos Antollini.

            M Offline
            M Offline
            Mehrdad
            wrote on last edited by
            #5

            Hello Carlos Antollini .... ;) your answer is good, too ! but, I have problem with that when I use Transaction with Option_Explicit set to ON. In some cases i should restart my application.

            C 1 Reply Last reply
            0
            • M Mehrdad

              Hello Carlos Antollini .... ;) your answer is good, too ! but, I have problem with that when I use Transaction with Option_Explicit set to ON. In some cases i should restart my application.

              C Offline
              C Offline
              Carlos Antollini
              wrote on last edited by
              #6

              You are working with VB? :-D Regards!!!! Carlos Antollini.

              M 1 Reply Last reply
              0
              • C Carlos Antollini

                You are working with VB? :-D Regards!!!! Carlos Antollini.

                M Offline
                M Offline
                Mehrdad
                wrote on last edited by
                #7

                Hello, Carlos Antollini ! No,... I'm working with Delphi 5.0 Regards!!!! ;)

                C 1 Reply Last reply
                0
                • M Mehrdad

                  Hello, Carlos Antollini ! No,... I'm working with Delphi 5.0 Regards!!!! ;)

                  C Offline
                  C Offline
                  Carlos Antollini
                  wrote on last edited by
                  #8

                  I'm Sorry, I don't Know Nothing About Delphi.... But If you use the Connection like a Global Variable, You don't must to forguet to close the connection, when Close the Application. For other part, I don't Know what happens in Delphi. I'm Sorry Again.... Best Regards!!!!:-D Carlos Antollini.

                  M 1 Reply Last reply
                  0
                  • C Carlos Antollini

                    I'm Sorry, I don't Know Nothing About Delphi.... But If you use the Connection like a Global Variable, You don't must to forguet to close the connection, when Close the Application. For other part, I don't Know what happens in Delphi. I'm Sorry Again.... Best Regards!!!!:-D Carlos Antollini.

                    M Offline
                    M Offline
                    Mehrdad
                    wrote on last edited by
                    #9

                    Hello again, Carlos Antollini ! Tanks for your helps. Regards!!!!;) Mehrdad.

                    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