Which data layer connection method do you prefer and why? RRS feed

  • General discussion

  • 1.) When the application opens, you are prompted for a login, the app opens the sql connection, and the connection stays open for the duration of your session.

    2.) You login to your application, and for every query you run, your class opens a connection, runs the transaction, and close the connection

    I was tought the 2nd method when i started coding, but now I'm just wondering if the 1st method will not be faster/better/neater?

    Wednesday, September 29, 2010 9:10 PM

All replies