Answered
Nesting cftransaction
i have a coldfusion component that does order processing. i
also have a separate dao crud component for each of my db tables.
when processing an order i need to make a number of changes to the
database tables. the create method within these cruds has a sql
insert statement and then a select max statement wrapped within a
cftransaction so i can return the newly generated
custid/orderid/etc.
Now i need the sql statements of the create methods to be wrapped in a transaction and i also need the actions in my order processing component to be wrapped in a transaction in case of any problems. but since coldfusion does not allow nested transactions, what would the best way to accomplish this?
Is it possible to have a select statement within an insert statement in t-sql? That could be the solution, but i haven't looked into it.
Thanks!
Now i need the sql statements of the create methods to be wrapped in a transaction and i also need the actions in my order processing component to be wrapped in a transaction in case of any problems. but since coldfusion does not allow nested transactions, what would the best way to accomplish this?
Is it possible to have a select statement within an insert statement in t-sql? That could be the solution, but i haven't looked into it.
Thanks!