Re: ADO Connections - close them or keep them open?
From: Jaxon (GregoryAJackson_at_hotmail.com)
Date: 06/15/04
- Next message: J Jetson: "Re: delete failing after backup job"
- Previous message: Aaron [SQL Server MVP]: "Re: maximum characters per column"
- In reply to: Steve Z: "Re: ADO Connections - close them or keep them open?"
- Next in thread: Steve Z: "Re: ADO Connections - close them or keep them open?"
- Reply: Steve Z: "Re: ADO Connections - close them or keep them open?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 15 Jun 2004 10:52:24 -0700
see inline:
> Every white paper I read is about WEB Access and ASP pages.
There are many white papers on Data Access Strategies and best practices for
N-Tier Applications. It is essentially the same for Web Apps. Web apps can
be (and likely should be) designed as n-tier apps.
>
> This is not what we have here. We have a school district - on an internal
network - many buildings - 1000+ teachers. Teachers get into attendance app
for less than 30 minutes and post attendance for classes. Admin folks and
secretaries get in for the whole day - call up kids, start maintenance - get
phone calls - interruptions.
That's fine. This still works for N-Tier Architecture
>
> What do you mean "share the connection". I meant "global connection" in
VB - global to all the forms that the user might call up in the app - I
didn't mean global to all users.
if Each user keeps a Global Connection object in their App on the client
side, you likely will run out of connections quickly and requests will start
to queue up. This is not scalable as larger number of clients adds up.
Connections are a precious resource that should be obtained late and
released early so that connections dont become your system bottleneck.
>
> Each workstation runs the app and makes a connection - no sharing
involved. We do all our server side work with SPROCS - so ADO calls the
SPROC from VB - returns the recordset and then the connection stays open
until the next ADO/SPROC call.
This sounds like a class 2-tier or Client Server app to me then. likely too
late to turn it into an N-Tier App....you may be stuck. However, I would
still not keep global connections around.
>
> We use win-nt authentication - so taking advantage of SQL pooling of
connections so a similiar one can be found doesn't really make sense to us.
if each user logs in directly to sql server, you are rigth. You might want
to rethink this and have your code access the DB using a handful of standard
logins (ReadOnly, Read Write, REad Write Delete, Admin, Etc). Then you can
take advantage of pooling and you can scale better
>
> I've found info that says that establishing the connection can be time
consuming - so why relinquish it and re-establish it??
You're right. You dont want to do this. You want to try to pool connections.
>
> Other programmers at this school district use ACCESS to touch there DB's.
I see that ACCESS opens "several" connections for just one user at a time -
this seems more of a waste of resources.
Yes Access connectivity to a SQL Server DB can be downright crippling.
hope all this info helps. Sounds like you are already married to an
architecture that you wont be able to change. You may be stuck into doing
what you are currently doing....
Cheers
GAJ
- Next message: J Jetson: "Re: delete failing after backup job"
- Previous message: Aaron [SQL Server MVP]: "Re: maximum characters per column"
- In reply to: Steve Z: "Re: ADO Connections - close them or keep them open?"
- Next in thread: Steve Z: "Re: ADO Connections - close them or keep them open?"
- Reply: Steve Z: "Re: ADO Connections - close them or keep them open?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|