Home All Groups Group Topic Archive Search About
Author
18 Jan 2006 11:22 PM
A.M-SG
Hi,

I underestand that DataAdapter.Update acts based on RowState to
insert/update/delete records. Is there any possibility that I can see the
scripts that DataAdapter generates and sends them to database? Or can I
possibly monitor the DataAdapter activity? If there isn't any, what would be
the closest way to spy what is going on within DataAdapter?



Thank you,
Alan

Author
19 Jan 2006 2:16 AM
Kevin Yu [MSFT]
Hi Alan,

Yes, you can get the actual executing command from the
DataAdapter.RowUpdating event. In the SqlRowUpdatingEventArgs, there is a
member named Command. It's a SqlCommand object that is going to be
executed. Also, the StatementType will tell you what type of the command
is. (SELECT/INSERT/UPDATE/DELETE)

If you're using a SQL server, you can also use a SQL Profiler to achieve
that. HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

AddThis Social Bookmark Button