Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / February 2005

Tip: Looking for answers? Try searching our database.

SQL server front end

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phil Greg - 16 Feb 2005 20:41 GMT
Hi,
I'm looking to have an SQL server, which won't be accessed directly, but
rather through web services. However, since web services are stateless, I
guess I'd have to open and close the connection on each call, which seems
rather time consuming.
I'm assuming I'd need to have a static variable which would contain a
pointer to my connection. Is that the way to go or is there another way to do
this?
Keenan Newton - 16 Feb 2005 20:48 GMT
Actually the opening and closing of a connection to Sql Server is very
inexpensive.  In reality .Net manages your connection ina  connection
pool.  As long as your connection string is the same,a nd you are using
the same identity it will re-use that connection over and over.  So in
reality when you close a connection your not really closing it but
returning it bacl to the connection pool.

The MSDN link below explains it in more detail:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conConnectionPoolingForSQLServerNETDataProvider.asp

Phil Greg - 16 Feb 2005 20:55 GMT
Actually, I made a mistake, I'm using MSDE. Does that still work?

> Actually the opening and closing of a connection to Sql Server is very
> inexpensive.  In reality .Net manages your connection ina  connection
[quoted text clipped - 6 lines]
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conConnectionPoolingForSQLServerNETDataProvider.asp
Keenan Newton - 16 Feb 2005 22:40 GMT
Should as it is .Net handling the connections

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.