Sql server and ASP.NET web service

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I am in the process of building a web service that will connect to my sql
server for data retrieval only. It will have to handle requests from multiple
apps on our shop floor. Roughly 5 queries per application every 10 seconds.
There is approximately 30 apps. It will be returning an object that holds an
int and a string.

My question is:

Should I open then sqlconnection when the web service starts and close it
when the webservice closes.

or

open and close the connection each time a request is made?

Last question

Should I use connection pooling for increased performance? OR am I not
hitting the box enough to bother with that?
 
Should I open then sqlconnection when the web service starts and close it
when the webservice closes.

..Net uses Connection Pooling. Open and Close Connections as quickly as
possible.
Should I use connection pooling for increased performance? OR am I not
hitting the box enough to bother with that?

If you're using .Net, you are already using Connection Pooling. :-D

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top