Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
Вложенные транзакции
|
|||
|---|---|---|---|
|
#18+
Можно ли в ADO использовать вложенные транзакции? и как?. Как узнать была ли начати транзакция в ADO.Connection ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 19.07.2004, 20:56 |
|
||
|
Вложенные транзакции
|
|||
|---|---|---|---|
|
#18+
Спросим у F1 "BeginTrans method" BeginTrans begins a new transaction. CommitTrans saves any changes and ends the current transaction. It may also start a new transaction. RollbackTrans cancels any changes made during the current transaction and ends the transaction. It may also start a new transaction. Syntax level = object.BeginTrans() object.BeginTrans object.CommitTrans object.RollbackTrans Return Value BeginTrans can be called as a function that returns a Long variable indicating the nesting level of the transaction. Parameters object A Connection object. Connection Use these methods with a Connection object when you want to save or cancel a series of changes made to the source data as a single unit. For example, to transfer money between accounts, you subtract an amount from one and add the same amount to the other. If either update fails, the accounts no longer balance. Making these changes within an open transaction ensures that either all or none of the changes go through. Note Not all providers support transactions. Verify that the provider-defined property "Transaction DDL" appears in the Connection object's Properties collection, indicating that the provider supports transactions. If the provider does not support transactions, calling one of these methods will return an error. Once you call the BeginTrans method, the provider will no longer instantaneously commit any changes you make until you call CommitTrans or RollbackTrans to end the transaction. For providers that support nested transactions, calling the BeginTrans method within an open transaction starts a new, nested transaction. The return value indicates the level of nesting: a return value of "1" indicates you have opened a top-level transaction (that is, the transaction is not nested within another transaction), "2" indicates that you have opened a second-level transaction (a transaction nested within a top-level transaction), and so forth. Calling CommitTrans or RollbackTrans affects only the most recently opened transaction; you must close or roll back the current transaction before you can resolve any higher-level transactions. Magnus ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.07.2004, 00:35 |
|
||
|
Вложенные транзакции
|
|||
|---|---|---|---|
|
#18+
Пишу 1 conn.BeginTrans 2 conn.BeginTrans 3 conn.CommitTrans 4 conn.CommitTrans В строке 2 возникает ошибка: "В данном сеансе невозможно запуск дополнительных транзакций". БД - SQL-Server. Может кто знает почему нельзя вложенную транзакцию открыть? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.07.2004, 11:46 |
|
||
|
Вложенные транзакции
|
|||
|---|---|---|---|
|
#18+
Так там же английским по серому написано что не все провайдеры поддерживают вложенные транзакции. Это не весь текст. Ну загляни ж в хелп-то. Или мне его сюда весь копировать? Код в студию. Строку соеденения желательно увидеть. Magnus ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.07.2004, 14:36 |
|
||
|
Вложенные транзакции
|
|||
|---|---|---|---|
|
#18+
Magnus23 Код в студию. Строку соеденения желательно увидеть. провайдер SQLOLEDB. Строка соединения: PROVIDER=SQLOLEDB;SERVER=local);DATABASE=UmsMed;TRUSTED_CONNECTION=YES ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.07.2004, 16:49 |
|
||
|
Вложенные транзакции
|
|||
|---|---|---|---|
|
#18+
PROVIDER=SQLOLEDB.1;SERVER=local);DATABASE=UmsMed;TRUSTED_CONNECTION=YES попробуй так Magnus ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.07.2004, 18:10 |
|
||
|
Вложенные транзакции
|
|||
|---|---|---|---|
|
#18+
Не даст он вам выполнить вложенную транзакцию (( Пройденный этап ... обощёл его следующим образом: cnn.execute "BEGIN TRANS" .... cnn.execute "BEGIN TRANS" ..... cnn.execute "COMMIT TRANS" .... cnn.execute "COMMIT TRANS" короче до 7 уровней вложенностию это работает 100%. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.07.2004, 10:56 |
|
||
|
Вложенные транзакции
|
|||
|---|---|---|---|
|
#18+
В таком случае нужно использовать хранимки и в них катать транзакции. Я так всегда делаю, чего и вам советую. Разве что запрос динамический, тогда - вешеприведенный метод. Magnus ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.07.2004, 13:52 |
|
||
|
Вложенные транзакции
|
|||
|---|---|---|---|
|
#18+
Всем большое спасибо за помощь. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.07.2004, 16:46 |
|
||
|
|

start [/forum/topic.php?fid=60&gotonew=1&tid=2169192]: |
0ms |
get settings: |
7ms |
get forum list: |
16ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
45ms |
get topic data: |
7ms |
get first new msg: |
4ms |
get forum data: |
2ms |
get page messages: |
40ms |
get tp. blocked users: |
1ms |
| others: | 238ms |
| total: | 366ms |

| 0 / 0 |
