Link to home
Start Free TrialLog in
Avatar of henryreynolds
henryreynoldsFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Delphi Interbase Set Transaction Level to disallow other users to post records

Good day,

I have a routine that Post important values to a transaction table.

When this form starts up, I call a procedure to check if there is any data that are ready to be posted to this table, if there is data I show
the data in a grid, and the user must then first print the data, and then he can post these transaction to the table.

I use a procedure to get the data from the different tables to show in the grid.
I want the following to happen : Ā If a user runs this routine, then if another user also run this routine from a diffrent machine the first user are allowed to see the data in the grid, but the second user must get a message that says No data found to post.
If the first user dont post any data at the time and he exit, then if a new guy runs this routine then the data must display again.

I dont want two user to run the same routine at the same time, and then both post the same data at the same time, because then I will have duplicate entries
in my table.

Please it is important for me to know what Level I must set my transaction component, I dont want any deadlock's.

I am using Delphi 6 with Interbase database components and Firebird 2.0.0

Thank you

Avatar of Limbeck

the same way you use a transaction table, use a systemtable or a diff table you have with 1 record. post that a user is previewing the data, and post when done. before opening the trans.table check this value

Avatar of henryreynolds


Hi sorry Limbeck but I dont understand your answer.
Avatar of Limbeck

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
it is a workaround