ExecuteNonQuery and events

  • Thread starter Thread starter Ian
  • Start date Start date
I

Ian

Hi

I'm using the ExecuteNonQuery command to insert a row in a database. How do I fire an event when the row has been added. I know how to do it with an OleDbDataAdapter, but I want to use ExecuteNonQuery. Ideas?
Ian
 
Hi Ian,

In your case, the rows are added on the database server directly, while in
the case of adapter it loops through all the rows one by one.
So, there is no simple way.
The only solution would be if database supports some sort of notification.

--
Miha Markic - RightHand .NET consulting & development
miha at rthand com

Hi

I'm using the ExecuteNonQuery command to insert a row in a database. How do
I fire an event when the row has been added. I know how to do it with an
OleDbDataAdapter, but I want to use ExecuteNonQuery. Ideas?
Ian
 

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

Back
Top