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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL and a networking application with login - Do

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 code

only exceptions are single user apps.
Go to Top of Page

vspin
Starting Member

4 Posts

Posted - 2010-03-25 : 19:45:58
Thank you russell :)))
Go to Top of Page
   

- Advertisement -