Subject Read uncommitted
Author Gustavo

I have an application which is used by several sellers at the same time. One seller usually make an order: he inserts a new order, selects the customer and then begins inserting lines with product codes and quantities. When he finishes, he emits the order. When he inserts a line (with product code and quantity), the application tells him if there is enough stock. But at the same time, there are many sellers doing the same (other orders) and perhaps they select the same products. So I would like to verify the stock considering the other simultaneous orders.

If I could read uncommitted data form other users, this would be easy, but AFAIK, Firebird doesn´t support read_uncommitted in transactions.

I thought of a solution using a temporary table which is filled with records while a user inserts lines of an order (with fields like user, name of the computer, product code, quantity, etc.). So to verify the stock I can check this table. But I think this is a bit dangerous because of sudden shut down of computers, etc.

So, my questions are:

Is there any way of reading uncommitted data of another transactions?

If the answer is no, is a good idea to do this the way I thought or there is a better way to do this?

Thanks in advance

[Non-text portions of this message have been removed]