MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

File Locking [tag export database]



Question: Do [tag export database] and [tag flag write] 'lock' the file 
before operating upon it?

Reason For Asking: I am trying to track inventory with MiniVend. The code on 
the 'report.html' page appears to update the 'qty' field in 'inventory.gdbm' 
but not the corresponding field in 'inventory.asc.' However, I want my client 
to be able to look at 'inventory.asc' and see up-to-date numbers. So...
I could add [tag export inventory inventory.asc][/tag] to the report.html 
page. That (if I understand correctly) would rewrite 'inventory.asc' every 
time an order is placed, with updated quantities. The only fear I have is of 
near-simultaneous orders getting garbled data from an unlocked, open file.

Then again, if I can safely rewrite 'inventory.asc' from the receipt page, 
why not just add a quantity field to 'products.asc' and rewrite *this* file 
with each order....Hmmm :o)

Thank you very much,
Rob Maurer


Search for: Match: Format: Sort by: