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
| Вернуться в корень Архива
|