LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I am executing multiple transactions within a single transaction reference, when one query fails, the VI fails to rollback all transactions

When any one of the three transactions fail, it should rollback all three transactions, at least that I what I was hoping to do. It doesn't do that however, it seems it only rolls back the last of the transactions. How can I keep track of multiple transactions and roll them all back if any fails to execute? The transactions are from 2 separate DB's and Three separate tables within those 2 DB's...

Please help if you have an idea as to how to accomplish this...

I am using the DB toolset VI's (LabVIEW Version 7.1)
0 Kudos
Message 1 of 2
(2,682 Views)
Hi tronchaser,

There are few things that seem unclear to me. When you refer to transactions, are you referring to executing a single SQL statements as a transaction? Also, what kinds of calls are you making to the database in these three "transactions"? Also, by saying that you can roll back the last transaction, is this implemented in the DB or have you implemented this functionality?

One way of implementing a "transaction history" would be to query the records that you will be modifying in these three transactions, and store their present data somewhere in LabVIEW (i.e., an array). Then, go and call each transaction, and if you return an error from any of them, then perform a new transaction that updates/changes the data back to the original (stored) va
lues. Hope this helps!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 2 of 2
(2,682 Views)