Using file to flag state (1 Viewer)

FuzMic

DataBase Tinker
Local time
Today, 16:52
Joined
Sep 13, 2006
Messages
719
Hi Peers

I have been using a table in a BackEnd .mdb to flag the state of certain transactions in a multi user environment. This means that if the state flagged is true, user have to wait until flag change to false before his request can be processed.

I am now thinking dropping this table and then rely on the existence of a same text file to flag the state. The switching of the existence of this text file rely on the file management system of the window OS.

The reason for the change is sometimes access to the Back End .mdb can be compromised.

Any advice on these 2 alternative? Is there another better way?


Sent from my HTC_PN071 using Tapatalk
 

MarkK

bit cruncher
Local time
Today, 01:52
Joined
Mar 17, 2004
Messages
8,181
I don't see what a text file has to do with your data. Why use a file? Why make the user wait to add data? Why not process the user's request immediately in all cases?

I don't understand.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 03:52
Joined
Feb 28, 2001
Messages
27,172
As always, there is that little catch... if something happens to your session before you clear your flag, you are still screwed. There is no way to safeguard against a catastrophic failure that doesn't involve making assumptions about how to break deadlocks.

Whether it is a table, a file, or a video feed for a telescope checking the phase of the moon, at some point you need to say "Time to proceed." Then the question becomes "How hard are you willing to work to stave off the inevitable?"

If your transactions interfere with one another, you can use the idea of a BEGIN/COMMIT sequence and intercept any traps reporting transaction conflicts. Trying to use any more complex method just opens up the door for something else to go wrong.

In summary, KISS. Keep It Seriously Simple. (That's the polite version.)
 

FuzMic

DataBase Tinker
Local time
Today, 16:52
Joined
Sep 13, 2006
Messages
719
Thanks guys. The issue is fighting for printers so I thought about flagging. Esle just let the spooler handle it

Sent from my HTC_PN071 using Tapatalk
 
Last edited:

Users who are viewing this thread

Top Bottom