15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Does DAO support nested transactions?

cmain -- cmain@iafrica.com
Friday, April 04, 1997


In a word 'Yes'.
Nested transactions are fully supported.
I would however like to add ( a tip ) that transaction modifications are
often not 
visible in workspaces other than the one in which they are being performed,
until the commit.
So you can nest commits and rollbacks as many times as you require.

----------
> From: Valery Barer 
> To: mfc-l@netcom.com
> Subject: Q: Does DAO support nested transactions?
> Date: 03 April 1997 21:06
> 
> Environment: Win95, NT3.51/4.0, VC++4.2b
> 
> Hello,
> Can somebody help me by answering the question:
> Does DAO support nested transactions, i.e. can I code like this:
> 
> db.m_pWorkspace->BeginTrans();
> // Do some changes
> db.m_pWorkspace->BeginTrans();
> // Do some changes
> if (Result1 == OK)
>     db.m_pWorkspace->CommitTrans();
> else
>     db.m_pWorkspace->Rollback();
> // Do some changes
> if (Result2 == OK)
>     db.m_pWorkspace->CommitTrans();
> else
>     db.m_pWorkspace->Rollback();
> 
> Thanks in advance.
> Valery Barer 
> 
>  __   __   __       AbirNet, Ltd.
> |  |_|  |_|  | Active Network Protection
>  \          /  __    __    __    __    __
>   |        |__|  |__|  |__|  |__|  |__|  |
>   |                                      |
>   |       <http://www.AbirNet.com>       |
>   |______________________________________|
> 
> The Next Generation in Internet and Intranet Protection.
> 



Daniel W. Levi -- DLevi@hworks.com
Friday, April 04, 1997

Yes.  Search on     transactions nested    in VC++ help.

DanL

----------
> From: Valery Barer 
> To: mfc-l@netcom.com
> Subject: Q: Does DAO support nested transactions?
> Date: Thursday, April 03, 1997 2:06 PM
> 
> Environment: Win95, NT3.51/4.0, VC++4.2b
> 
> Hello,
> Can somebody help me by answering the question:
> Does DAO support nested transactions, i.e. can I code like this:
> 
> db.m_pWorkspace->BeginTrans();
> // Do some changes
> db.m_pWorkspace->BeginTrans();
> // Do some changes
> if (Result1 == OK)
>     db.m_pWorkspace->CommitTrans();
> else
>     db.m_pWorkspace->Rollback();
> // Do some changes
> if (Result2 == OK)
>     db.m_pWorkspace->CommitTrans();
> else
>     db.m_pWorkspace->Rollback();
> 
> Thanks in advance.
> Valery Barer 
> 
>  __   __   __       AbirNet, Ltd.
> |  |_|  |_|  | Active Network Protection
>  \          /  __    __    __    __    __
>   |        |__|  |__|  |__|  |__|  |__|  |
>   |                                      |
>   |       <http://www.AbirNet.com>       |
>   |______________________________________|
> 
> The Next Generation in Internet and Intranet Protection.




Become an MFC-L member | Вернуться в корень Архива |