DataAdapter.Update

A

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
 
K

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."
 

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