|
|
|
select for update
|
|||
|---|---|---|---|
|
#18+
Хочу в процедуре делать апдейт поля, использую конструкцию: for select field1 from table1 for update of field1 into :tmpVar do begin end; Какой конструкцией затем апдетйтить поле? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.05.2004, 10:21 |
|
||
|
select for update
|
|||
|---|---|---|---|
|
#18+
Обычной ! UPDATE TABLE SET ... Best regards, Dnico. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.05.2004, 10:38 |
|
||
|
select for update
|
|||
|---|---|---|---|
|
#18+
простой update обновит мне всю таблицу, а мне надо изменить поле в текущей записи, выбранной курсором (у меня же для этого курсор делается). Зачем нужна конструкция where current of и как ей пользоваться? что-то я примеров не найду... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.05.2004, 10:54 |
|
||
|
select for update
|
|||
|---|---|---|---|
|
#18+
Так это же связано только с блокировкой ... автор(1.5) Explicit locking Nickolay Samofatov The addition of the optional WITH LOCK clause provides a limited explicit pessimistic locking capability for cautious use in conditions where the affected row set is a) extremely small (ideally, a singleton) and b) precisely controlled by the application code. NOTE The need for a pessimistic lock in Firebird is very rare indeed and should be well understood before use of this extension is considered. Syntax SELECT ... FROM <sometable> [WHERE ...] [FOR UPDATE [OF ...]] [WITH LOCK] ...; If the WITH LOCK clause succeeds, it will secure a lock on the selected rows and prevent any other transaction from obtaining write access to any of those rows, or their dependants, until your transaction ends. If the FOR UPDATE clause is included, the lock will be applied to each row, one by one, as it is fetched into the server-side row cache. It becomes possible, then, that a lock which appeared to succeed when requested will nevertheless fail subsequently, when an attempt is made to fetch a row which becomes locked by another transaction. Best regards, Dnico. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.05.2004, 11:04 |
|
||
|
select for update
|
|||
|---|---|---|---|
|
#18+
2 Dmitry Klykoff : Смотри сюда . Там показано как. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.05.2004, 12:07 |
|
||
|
|

start [/forum/topic.php?fid=40&msg=32506948&tid=1578703]: |
0ms |
get settings: |
6ms |
get forum list: |
17ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
195ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
38ms |
get tp. blocked users: |
1ms |
| others: | 230ms |
| total: | 505ms |

| 0 / 0 |
