GregM
GregM

Reputation: 2654

Command.StatementCompleted get called more than once

I'm using this when I create a command :

command.CommandType = CommandType.StoredProcedure;
command.StatementCompleted += new StatementCompletedEventHandler(statementCompleted);

But my method "statementCompleted" is called more than once for a same command.

Someone have an idea...

Thanks

Upvotes: 0

Views: 334

Answers (1)

Kinexus
Kinexus

Reputation: 12904

The StatementCompleted event can fire multiple times if the sql you are attempting to run contains more than 1 sql command, such as multiple insert or update entries.

Upvotes: 1

Related Questions