Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > ado. net - An event was unable to invoke any of the subscribers

Reply
Thread Tools

ado. net - An event was unable to invoke any of the subscribers

 
 
ss
Guest
Posts: n/a
 
      02-15-2006
I am working with distributed transactions. When I open and close the
database
multiple times within one single distributed transaction, then the 11th
time
fails when the database is closed. I receive "An event was unable to
invoke any of the subscribers". Any help is greatly appreciated.
Sample version of my code is as follows:

ServiceConfig cfg = new ServiceConfig();
cfg.Transaction = TransactionOption.Required;
ServiceDomain.Enter(cfg);

for (int i = 0; i < 20; i++) {
using (SqlConnection conn = new

SqlConnection("server=.;database=pubs;Trusted_Conn ection=Yes;Enlist=false;"))
{
conn.Open();
conn.EnlistDistributedTransaction((ITransaction)
ContextUtil.Transaction);
using (SqlCommand cmd = new SqlCommand("update authors set au_lname =
au_lname", conn)) {
cmd.ExecuteNonQuery();
}
conn.EnlistDistributedTransaction(null);
}
}
ServiceDomain.SetComplete();
ServiceDomain.Leave();

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Commycast subscribers or former subscribers who were FROGThrottled gohere and get your 16 bucks. Tony Computer Support 0 07-10-2010 07:07 PM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
News.individual.net to charge subscribers D Computer Support 5 02-17-2005 03:58 AM
OT: AOL Admits 40% of Subscribers Don't Have Computers Dragon MCSE 21 11-18-2004 02:21 AM
free test courses for TechNet Subscribers Jay MCSE 1 07-27-2004 08:52 PM



Advertisments