Asynchronous Delegate and Double Commit Problem

  • Thread starter Darryl A. J. Staflund
  • Start date
D

Darryl A. J. Staflund

Hi there,

Can anyone tell me why invoking a single SQL insert statement (well, rather,
a method that performs a SQL insert) using an asynchronous delegate should
result in twice the number of records being inserted? Am I just making a
mistake somewhere? (though I don't get double the records if I call the
method synchronously.)

Thanks,
Darryl
 
D

Darryl A. J. Staflund

Hi again,

Sorry for posting this problem. I don't know what the problem is, but I
only get it if the asynchronous call is generated (indirectly) by clicking
on an ASP.NET Web Form. If I bypass the form and (indirectly) generate the
call using an XML web service, the double commit problem disappears. I am
guessing I don't handle postback right, though I still don't know why this
side-effect should only appear on asynchronous calls.

Darryl
 
J

jm

Is autoeventwireup set to false?

Darryl A. J. Staflund said:
Hi again,

Sorry for posting this problem. I don't know what the problem is, but I
only get it if the asynchronous call is generated (indirectly) by clicking
on an ASP.NET Web Form. If I bypass the form and (indirectly) generate the
call using an XML web service, the double commit problem disappears. I am
guessing I don't handle postback right, though I still don't know why this
side-effect should only appear on asynchronous calls.

Darryl
 

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