troubleshooting Question

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

Avatar of henryreynolds
henryreynoldsFlag for United Kingdom of Great Britain and Northern Ireland asked on
Delphi
4 Comments1 Solution306 ViewsLast Modified:
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

ASKER CERTIFIED SOLUTION
Limbeck

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros