.Net ComponentServices & AutoComplete attribute questions

J

Jim Bancroft

I'm having some trouble mixing "AutoComplete" attributes and transactions
with my VB .Net components.

Right now, I have two classes --a "parent" and "child"-- that inherit from
the .Net "ComponentServices" class. The parent class creates a new
transaction context (using a Transaction attribute) and calls the child
class, which participates in the transaction as it opens a SqlConnection to
a database and reads the contents of a table. Both classes have the
AutoComplete attribute set on them.

The problem for me comes when a transaction is supposed to fail. I've
modified my child class so that it tries opening an incorrectly-spelled
table, which triggers an exception. The Catch statement in the child
component is entered, but the transaction appears to complete, at least
according to the transaction statistics page in the COM+ explorer? As I
understand it, the AutoComplete attribute is supposed to abort the
transaction when an exception occurs, but it doesn't appear to be the case
here.

Am I missing a step or have I done something wrong? Do I have to vote
against the transaction my child class's exception handler, and if so,
doesn't that work against the notion of an AutoComplete attribute? Thanks
for your advice.

-Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top