[python-win32] db-api connection pooling in ASP?

Geoffrey Talvola gtalvola at nameconnector.com
Fri Jul 23 19:55:19 CEST 2004


ADO will do connection pooling automatically.  In my experience all you need
to do is make sure that at least one connection always exists with a
particular connection string, by keeping a connection object in a global
variable.  Then all other connections with the same connection string are
automatically pooled and recycled.  In other words you can write the rest of
your code to simply create and destroy connections as needed and pooling
will happen by magic.

adodbapi is a wrapper over ADO, so automatic connection pooling should work
with it.

You can use Performance Monitor to verify the number of SQL Server
connections and see if pooling is working properly.

Hope this helps.

- Geoff

Craig H. Anderson wrote:
> Greetings,
> 
> My adventure in mixing Python scripting into
> an existing VBScript and Javascript application
> is moving along.  The current question is how
> to manage database connections.
> 
> * The database is Sql-server 2000
> * Current VBScript code uses ADO
> * New Python code uses DB-API library adodbapi
> 
> In production there may be 100 browser seats accessing
> the web pages.
> 
> I'm thinking I will try this library
> http://jonpy.sourceforge.net/dbpool.html
> 
> Does anyone have experience and advice on this?
> 
> Another possibility is using the same ADO connection object
> as the VBScript code.  I could use this to initialze the adodbapi
> connection.  However, I'm not sure how to pass the ADO object from
> VBScript to Python. 
> 
> Thanks for your help.
> 
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32



More information about the Python-win32 mailing list