Home
Home Page
Circuits of blocking in Databases
Blocking of the Table
Blocking of page
Compression of the data with a view of economy of a place and acceleration of job Oracle
Compression of the data with a view of economy of a place and acceleration of job Oracle
Service of events in the SQL-server
Offered variant of the decision
SQL Server in questions and answers
Boards - how to benefit
Development Ajax: Use XML in searches and answers
Transfer of pairs name / value (name/value)
Transfer XML on the server
All in the frameworks
Creation of wap-pages (in a format *.wml)
How to recover Perl/CGI a script
Mezhprocessovye interactions
Kill of the target data
Correctness at construction of a resource!
Example of a tree
Links
 

 

Blocking of page


The most bottom a level of blocking is the level of the table. The processor microsoft jet automatically establishes blocking page and cannot be supervised by your program. The page of the data can soderzhat`neskol`ko recordings, the size of it{him} is equal 26 kb. Blocking of page means blokirovkuvsekh the recordings, taking place on this page. If length of recording - 512 bajtov will be 4 recordings, and if 50 bajtov that 40 recordings are blocked. It is impossible beforehand to define{determine} @ set exact number of recordings, since the table can contain the removed recordings (which leave only during condensation). But, not looking on it the object recordset has property lockedits, which pozvoljaetupravljat` page blocking from the program.

Blocking at a level of the table imeetdva a mode - pessimistic (lockedits ju true) and optimistic (lockedits = false). Pessimistic blocking is by default established.

Pessimistic blocking blocks page by a call of methods edit and addnew, and remains blocked until then yet budetvypolnen a method update or cancelupdate. During all time any program has no access to zablikirovannoj to page.

Advantages. It is provided as much as possible vozmozhnyjuroven` integrity of the data.

Lacks. The page can be blocked during long time.

Optimistic blocking blocks page only by a call of a method update. It means, that the user causes methods edit and addnew, makes actions with dsannymi, and only at the moment of preservation of updating the processor microsoft jet tries to block page. If all passes successfully recording gets in the table but if will find out, that this recording was already edited, updating is cancelled also the user poluchaetsoobhhenie that given by someone has already been changed.

Advantages. The page is blocked on minimal vozvozhnoe time, that umen`shaetsjachislo messages on blocking.

Lacks. Can lead to to mistakes of blocking at simultaneous editing recording by two users when they will spend updating.

Programno it is carried out as follows:


* For an element data - data1.recordset.lockedits = true (or false);

* For object dao - rs.lockedits = true (or false);


At job with pessimesticheskoj and optimistic blocking the call idle is used. This method stops performance of the program on visual basic for a while obnavlenija dynamic and static sets which were open by this program. The call of this method guarantees, that in your program the latest changes in a data set will get.

Programno it is carried out as follows:



rs.update

dbengine.idle dbfreelock


To make a pause


That's all.