Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
vspin
Starting Member
4 Posts |
Posted - 2010-03-25 : 17:19:30
|
My .NET network application is going to use SQL Server to authenticate user credentials. Should my server application maintain an open connection with the database until it's stopped (or closed), OR do I constantly open a SQL connection, execute the query and then close with every new login?I don't imagine the second option is the correct way..Thanks |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-03-25 : 18:55:47
|
2nd option is the correct way for most applications. Close (and dispose of) the connection as soon as possible in your .Net codeonly exceptions are single user apps. |
|
|
vspin
Starting Member
4 Posts |
Posted - 2010-03-25 : 19:45:58
|
Thank you russell :))) |
|
|
|
|
|