I have a form based on a table called Globals in our database. I then have a tab with a list view of records from the Report Table (and a small add button above the list view). When I click the Add button, it shows a pop-up window with a list view of ReportSample records, and a drop down in the header of Report Type (from Report Table). On show of the form, it starts a new transaction. On change of ReportType, it rolls back the transaction, and starts a new transaction. When clicking the “ok” button, it commits the transaction and closes the window.
So…onto the problem. The first report record works fine. When any additional report record is made, and you see the pop-up window, if you change the Report Type (which does a rollback and starts a new transaction), it takes all records out of the found set in the Report list view tab. However the record is still there if you reload.
So, in the big picture view, I start a transaction, create a record and related records, then commit and close the window. Leaving 1 record in the list view. I then add another, and start another transaction, and see 2 records in the list view. Change the Report Type which does a rollback and new transaction, and then I see 0 records in the tab list view behind the window.
I have had to read your post something like 4 times. Maybe it is was me but it was not easy to follow…
Anyway, I think your problem lies in the below and not in your use of a transaction.
On show of the form, it starts a new transaction … When any additional report record is made, and you see the pop-up window
On show of the form you start your transaction right?
For any additional report you show a form in a dialog right?
Now, when you close the form in dialog your initial form is in front again and the on show event of that form will be triggered again!
So in fact it is possible that you trigger a transaction in a transaction.
I am not really sure about my conclusion but I can imagine that triggering a new transaction will commit the previous one!
Sorry about the confusing description, but it is a bit hard to explain. The only time a transaction is started is on the onShow of the pop-up window, not on the main form.
Overall, it just seems that when a transaction is started, then commited, and then another one is started and rolled-back…Both transactions get rolled-back.
Well, if that’s the case I can only advise you to see if this also occurs when you pull the code from you solution into a small solution.
When you still have the issue you can file this as a bug and the nice thing is that you already have the sample solution they will ask you for (for sure )…