Transaction Directives..

M

mahesh

How can i include Transaction Directives. Will it work like same fashion of
manual code.
My appln is in lauching stage, i dont want to change the coding structure
for manual transaction code inclusion. So i decided to include trasaction
directives in the page header. but this is giving error as "cannot execute
trasacted code" or sometimes as "Import of MSDTC Transaction failed: Result
code =0x8004d00e.
Is there settings to be played for this inclusion anywhere or wat ?
Thnkz
 
S

Sahil Malik

Mahesh,

MSDTC distributed transactions are problematic, though not impossible to
fix. What is it that you are trying to get done here, so maybe we could
suggest an alternate approach?

Anyway, the exception you are seeing is a COMException. What it generally
means is "A is trying to enlist when B has already aborted or commited"

Maybe one SPID is trying to commit/abort the transaction while the other is
trying to enlist in the transaction or resetting the connection by using
sp_reset_connection stored procedure? (Run a trace to find out). Also,
connection pooling might contribute to this error - can you turn it off for
an experiment and see if that fixes it? If that indeed does fix it, then
dude, as Bill Vaughn would say "You're Pooched !!". You'll then probably
need to redesign your data access layer to work "with" pooling a bit better
:)

- Sahil Malik
http://codebetter.com/blogs/sahil.malik/
 
M

~Maheshkumar.r

Thnkz, Now i can't redesign those layers. becoz i have generated all the
codes in web matrix say for insert, then followed by updation. Tats why i
went for Trans directives, but not suceed.

button click()
{
insert (para1,para2,par23.....etc) - para meter to
the web matrix generated codes.
updation(para1,para2,par23.....etc) - ""
}

insert(....)
{
webmatrix gen codes with queries
}
update(...)
{
webmatrix gen codes with queries
}

so in the above code, i need to include trans. where it possible sahil ??
help me out...
MAheshkumar.R
 

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

Top