"=?Utf-8?B?R3JpZ3M=?=" <(E-Mail Removed)> wrote in
news:245DE7C2-7BF3-4505-AA98-(E-Mail Removed):
> I thought I could just create the connection in the BACKBONE's
> Global.asax file as a session variable and use it when I need to
> connect to the DB but that had no difference. Still 11 connections.
> I understand that the web service simple is being called 11 seperate
> times.
Are you storing the db connection as an application variable or session
variable?
If you want to have 1 connection that is shared across all instances,
place your connection in an application variable.
> Are we all wasting
> connections and the overhead of connections connecting? Am I missing
> something here?
BTW, you're not wasting connections... When you share 1 connection, you
might end up with queued request (you may have to build the queuing
mechanism yourself). A connection can only process 1 request at a time,
so if you have 5 users hitting your web service, users 2-5 might have to
wait until the connection is freed by user 1 before they can submit a
query.
If you'll pulling a subset of data frequency, consider caching the data
locally either in a shared dataset or in a local database.
--
Lucas Tam ((E-Mail Removed))
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/