Avatar of henryreynolds
henryreynolds
Flag 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

Delphi

Avatar of undefined
Last Comment
Limbeck

8/22/2022 - Mon
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

henryreynolds

ASKER
Hi sorry Limbeck but I dont understand your answer.
ASKER CERTIFIED SOLUTION
Limbeck

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Limbeck

it is a workaround
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy