M
martin
Hi,
I have three database Inserts that must be proformed as part of a
transaction.
I already have three seperate functions that perform each database insert
seperatly. The trouble is each function opens and closes it's own database
connection.
does this mean that transaction can't be used in this senario, from my basic
tests it would appear they can't.
I guess what I am asking is
does a database transaction have to be performed as part of the same
connection
for example open connection -- do three seperste inserts to seperate
tabels -- close the connection
or is it possible to have three seperate inserts each performed within its
own seperate connection as part of a tranaction.
after all how can a transaction be "rolled back" if it has taken place
inside a connection that is now closed.
may be a better design is called for in the future.
any help and advice is appreciated.
cheers
martin.
I have three database Inserts that must be proformed as part of a
transaction.
I already have three seperate functions that perform each database insert
seperatly. The trouble is each function opens and closes it's own database
connection.
does this mean that transaction can't be used in this senario, from my basic
tests it would appear they can't.
I guess what I am asking is
does a database transaction have to be performed as part of the same
connection
for example open connection -- do three seperste inserts to seperate
tabels -- close the connection
or is it possible to have three seperate inserts each performed within its
own seperate connection as part of a tranaction.
after all how can a transaction be "rolled back" if it has taken place
inside a connection that is now closed.
may be a better design is called for in the future.
any help and advice is appreciated.
cheers
martin.