Solved

InterBase DeadLock

Posted on 2002-04-09
2
527 Views
Last Modified: 2010-04-04
I am a delphi Programmer and using IBX
every time i use interbase over multi user i get error message "deadlock"
what should i do in my program to avoid this problem ?
0
Comment
Question by:osasoft
2 Comments
 
LVL 7

Expert Comment

by:God_Ares
ID: 6930580
it has somthing to do with transactions


t1    |t2
      | r(x)  
r(x)  |        
x=x+20|        
      | r(y)  
      | y=x+20
w(x)  |        
      | w(x)  
commit|
      |commit  

this are Bad transactions. t1 shoudn't read x until t2 has unlocked it.

you should learn more about this subject, search the internet, or take a course.

0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
ID: 6930806
yep, its a transaction problem,
normally caused by two session like

session1 starts a transaction
session2 starts a transaction

session1 modifies table a
session2 modifies table b

session1 wants to modify table b
session2 wants to modify table a
-->deadlock, each session waits for the other

well, there is no common solution,
it depends on your code,
maybe you never end a transaction?

meikl ;-)


0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now