This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C3B016.BBB07A60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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



------=_NextPart_000_0008_01C3B016.BBB07A60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm using the ExecuteNonQuery command =
to insert a=20
row in a database.&nbsp; How do I fire an event when the row has been=20
added.&nbsp; I know how to do it with an </FONT><FONT face=3DArial=20
size=3D2>OleDbDataAdapter, but I want to use ExecuteNonQuery.&nbsp; =
Ideas?</FONT>
<P><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2>Ian</FONT></P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P></DIV></BODY></HTML>

------=_NextPart_000_0008_01C3B016.BBB07A60--

Re: ExecuteNonQuery and events by Miha

Miha
Fri Nov 21 14:36:55 CST 2003

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

"Ian" <ihinde@hotmail.com> wrote in message
news:%23$XvziFsDHA.560@TK2MSFTNGP11.phx.gbl...
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