simultaneous sql transations

gorelshv

Member
Licensed User
Longtime User
how does it get handled? i am writing a multi-threaded app that issues sql commands (reading and writing) and am wondering what happens if two transactions are issued on the same table at the same time? will they deadlock? will one transaction wait for the other to complete? what is the best way of identifying and dealing with these situations?
is making a dynamic arraylist with sql commands that run by turn is a feasible option? i am confused...
thanks.
 
Last edited:

gorelshv

Member
Licensed User
Longtime User
I am writing a server-like app which is devided into rooms, each room is represented by a table and is handled with it's own thread. This got me intrested to know what happens if a DB is accessed simultaneously at higher levels (DB) and lower levels (table, row, etc.).
I would like to know how b4a handles such cases.
BTW, when you say the implementation is thread-safe you mean that you (creators of b4a) took care of it when developing b4a?
 
Upvote 0

gorelshv

Member
Licensed User
Longtime User
I've spent time reading on sql and one thing I've noticed is that issueing two write commands simultaneously can lead to a deadlock as each transaftion waits for the other to complete. Could such a thing happen in a b4a app? Also, I didn't quite understand what is indexing and how does it solve the problem.
 
Upvote 0
Top