Hi,
I have some code like this :

DBTransaction = DBConnection.BeginTransaction()

Assuming I don't book keep the return from this call ,
How do I
1) determine if there is a DBTransaction pending on this DBConnection and
2 ) if there is , what is the DBTransaction .


thanks
-chaz

RE: DBTransaction question by v-kevy

v-kevy
Mon Jun 05 22:11:53 CDT 2006

Hi Chaz,

We cannot get the pending transactions from a DBConnection object. So you
have to keep the object reference, so that you can commit or rollback the
transaction.

Kevin Yu
Microsoft Online Community Support

============================================================================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
============================================================================
==========================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)


RE: DBTransaction question by chaz

chaz
Tue Jun 06 08:00:02 CDT 2006

Kevin,
Surely the DBTransaction is available at some level . Is this an oversight
on the design of the DBConnection object ?
It seems arbitrary that a function such as DBConnection.CommitTransaction()
has been left out , is there some underlying architectural reason for this?
thanks,
Chaz

"Kevin Yu [MSFT]" wrote:

> Hi Chaz,
>
> We cannot get the pending transactions from a DBConnection object. So you
> have to keep the object reference, so that you can commit or rollback the
> transaction.
>
> Kevin Yu
> Microsoft Online Community Support
>
> ============================================================================
> ==========================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ============================================================================
> ==========================
>
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>

RE: DBTransaction question by v-kevy

v-kevy
Wed Jun 07 00:08:10 CDT 2006

Hi Chaz,

In my opinion, it's not an oversight. You have to keep the reference to
DBTransactions yourself. Is there any reason that you cannot keep it in
your code?

Also, Commit is performed on a single Trasaction, not on a DBConnection.
Some provider support parellel transactions, so this cannot be used on a
DBConnection object.

Kevin Yu
Microsoft Online Community Support

============================================================================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
============================================================================
==========================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)