On 18 Mar 2005 04:52:03 -0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> is there an alternative way of:
> 
> - create a connection object
> - open the connection
> - close the connection
> 
> every time one has to run a query.

It's actually morte like:

create connection
create cursor
execute SQL
process cursor
close cursor
close connection

The bit that you can avoid it the creation of the connection - that's
an intensive process. If your system is single threaded, or if it's a
very small app, you can just create a single open connection and keep
using that. I usually find that I need a pool of open connections,
though.

-- 
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to