Code Red > .NET

SQL Connection and web service.

(1/1)

Draftek:
I'm creating a web service that to pass sql database info to and from a client application. Is it generally a better idea to make the connection object upon instantiation of the server object by the client application or inside each WebMethod?

This thing will only be hit by a half dozen people working on the same site as the server and the same off site through an internet connection so I'm not too worried about transaction conflicts, more so about performance because my testing of the web service sucks from that standpoint.

tjr:

--- Quote from: Draftek on October 16, 2008, 08:34:22 AM ---I'm creating a web service that to pass sql database info to and from a client application. Is it generally a better idea to make the connection object upon instantiation of the server object by the client application or inside each WebMethod?

This thing will only be hit by a half dozen people working on the same site as the server and the same off site through an internet connection so I'm not too worried about transaction conflicts, more so about performance because my testing of the web service sucks from that standpoint.

--- End quote ---
I did a google search for some .NET Cache stuff and it might help out. Especially search result 2.

Hitting the database every time for data is very very expensive. If you cache your results in memory you will gain quite a bit of speed.

Draftek:
Thanks!

I'll take a look and see if it applies to my particular app.

Navigation

[0] Message Index

Go to full version