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 / August 2004

Tip: Looking for answers? Try searching our database.

High Performance Web Services with ADO.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
J. L. Goddard - 01 Aug 2004 05:05 GMT
Suppose I were designing a web service to accept many data transactions
per second and put them into a sql server database.

What design recommendations would you make ?

For examply, should I use the Context.Util transaction binding?

What about SOAPMethod in the WebMethod?  Should I go with the default,
or add extra code here?

How about the SqlConnection ?

Should I establish a global SqlConnection in global.asax and use that
for all transactions?

Should I open and close a SqlConnection for each call of the web method?

If I am inserting all these records into a Sql table, is there a way to
pool them up somehow so there are not a million SqlConnections opening
and closing?

Is there a way to combine the INSERTS so that there are not a million
INSERT statements on the SQL server ?

Signature

incognito @ http://kentpsychedelic.blogspot.com

Scott M. - 01 Aug 2004 06:06 GMT
> Should I open and close a SqlConnection for each call of the web method?

It is always a good idea to only keep the connection open for just the
minimal amount of time necessary.  If you use a DataAdapter, it will take
care of opening and closing the connection for you.

> If I am inserting all these records into a Sql table, is there a way to
> pool them up somehow so there are not a million SqlConnections opening
> and closing?

ADO .NET uses connection pooling by default so even when you are done with
your connection object, it will go back into the pool for reuse.

> Is there a way to combine the INSERTS so that there are not a million
> INSERT statements on the SQL server ?

Using the Disconnected paradigm of DataSets, you would make your changes to
the disconnected copy of the data and then do one update.
novelle.vague - 01 Aug 2004 06:10 GMT
>> Should I open and close a SqlConnection for each call of the web method?
>
[quoted text clipped - 14 lines]
> Using the Disconnected paradigm of DataSets, you would make your changes
> to the disconnected copy of the data and then do one update.

Maybe I wasn't clear.

This is a one way web service for a client to post data to on a per record
basis.

The only operation will be them, consuming the web service and sending data,
which will then be inserted into a sql table...

Signature

http://kentpsychedelic.blogspot.com


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.