This content has been marked as final. Show 4 replies
According to the USAGE description of the cftransaction tag:
Within a transaction block, you can write queries to more than one database, but you must commit or roll back a transaction to one database before writing a query to another.
Try setting up the DB2 server as a linked server in your SQL server, then write your query with the SQL server as the only datasource.
What are you actually trying to do that you need to maintain a database
transaction across multiple databases? Usually the point of a
transaction is to be able to roll back a partial update if the complete
How would one roll back a select? There is no update there? Wouldn't
you select the data from the first database then update the second
within a transaction block if required?
Or did I miss the point?
Thanks all for the response. Our system tables are stored in Sql Sever.
The datas entered are stored in DB2. Our security stuffs are stored in
Sql Server. Based on the user input(datas) in DB2, I have to check Sql Server
database to determine if I need to secure those rows based on some condition.
The table names and values to secure the data are in Sql server.
For that reason I need to access the Sqlserver rows.
I can do this select on the action page, before the ctransaction but there are numerous modules which calls the same database tag for Insert. So it was better to do it in the Insert tag(s).
Hope this helps