473,324 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Database connections in Web Services

What is the best way to handle database connections within a Web Service?
I'd like to pool connections for optimum efficiency.
Nov 18 '05 #1
3 1168
RP
So long as you use the same connection parameters i.e. login etc. ado.net
connection pooling should handle that for you.

"Random" <ci*******@hotmail.com> wrote in message
news:eD**************@TK2MSFTNGP12.phx.gbl...
What is the best way to handle database connections within a Web Service?
I'd like to pool connections for optimum efficiency.

Nov 18 '05 #2
But how should I handle the instantiation of the SQLConnection object? In a
private variable seems right, but should I declare it using the New operator
there... or do that within my WebMethods?
"RP" <rp@nospam.com> wrote in message
news:ey*************@tk2msftngp13.phx.gbl...
So long as you use the same connection parameters i.e. login etc. ado.net
connection pooling should handle that for you.

"Random" <ci*******@hotmail.com> wrote in message
news:eD**************@TK2MSFTNGP12.phx.gbl...
What is the best way to handle database connections within a Web Service? I'd like to pool connections for optimum efficiency.


Nov 18 '05 #3
Webservices by design should be stateless for maximum efficeincy. Open it
in your webmethod, use it and close it all within the method. Let the
connection pooling look after itself unless you are receiving problems..

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Random" <ci*******@hotmail.com> wrote in message
news:eD**************@TK2MSFTNGP12.phx.gbl...
What is the best way to handle database connections within a Web Service?
I'd like to pool connections for optimum efficiency.

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I...
0
by: Michael Bourgon | last post by:
I've been having the same problem for 2 weeks now. If anyone has any ideas, I'd love to hear them. We are using both SQL and Windows Authentication. I was running a Profiler Trace at the time,...
3
by: deegs_ca | last post by:
Here is my jdbc info url = jdbc:db2://LXPP04913:60000/TEST driver = COM.ibm.db2.jdbc.net.DB2Driver For some reason as I'm importing data via a jdbc client Db2 gets through a few rows and then...
14
by: Nick Gilbert | last post by:
Hi, I have an asp.net application which runs from a CD-ROM using Cassini. As such, it is single user only. The application connects to an Access database when it is loaded, and keeps the same...
10
by: mjf | last post by:
Hello, We made a backup image file for a database on one machine (A), and we restored the database on another machine (B), using the backup image file. Everything went fine. But when we try to...
3
by: Steve Teeples | last post by:
I am writing my first database application. I am unable to even get to first base because I can't seem to access the data in the database. Each time the "Fill" command is executed I get an...
0
by: Jonathan Wood | last post by:
I seem to be having errors creating and accessing an SQL database. Unfortunatley, I am brand new to SQL setup and administration issues so this really is not my area of expertise. I know I had...
2
by: Patrick F | last post by:
Hi, i have SQL Server 2005 and a database set that is called, myCompany the problem is that i cant connect from my page to it, here is from the web.config: ( i have got this connectionstring from...
7
by: Martin | last post by:
Hello Does anyone know if it is possible to use the smo db.Create() method to create a new sql server database with sql server 2005 express? The debugger complains that remote operations are not...
5
by: Glen Buell | last post by:
Hi all, I have a major problem with my ASP.NET website and it's SQL Server 2005 Express database, and I'm wondering if anyone could help me out with it. This site is on a webhost...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.