Skip site navigation (1) Skip section navigation (2)

more problems with transactions

From: "Campbell, Scott" <scampbell1(at)mtt(dot)ca>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: more problems with transactions
Date: 2000-08-31 19:23:39
Message-ID: ED7A447524CCD311A9BF009027DC86ED011E39FE@NSEXCH02 (view raw or flat)
Thread:
Lists: pgsql-general
Hey again....

I have another question regarding using transactions with perl/dbi.

I think I have the general idea of creating and committing the transactions
etc through the DBI under control but,
My problem is that I'm connecting to the database in one perl script which
opens the transaction, and then calling the same script recursivly aswell as
another script later on which will eventually commit the transaction. Each
time the script is re-called, the connection is boaken to the database (I
read why this happens in the DBI man page and I'm cool on the fact that when
you execute a new script, the resources from the old one are released).

to try to get around this, I tried passing the database handle back to the
script to keep the connection and my transaction alive but when I try to
execute a query I get an error.

so my main question is, how do I keep my database connection/transaction
alive while going from script to script?
any ideas???

Thanks again :)
Scott



pgsql-general by date

Next:From: ChrisDate: 2000-08-31 22:41:09
Subject: Re: INHERITANCE
Previous:From: Joel BurtonDate: 2000-08-31 18:35:51
Subject: Re: convert from access

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group