Howt o get the t-sql statements being used to Update a DataSet

Posted by Dennis on Stack Overflow See other posts from Stack Overflow or by Dennis
Published on 2010-05-21T14:34:34Z Indexed on 2010/05/21 18:10 UTC
Read the original article Hit count: 258

Filed under:
|
|

I've a c# DataSet object with one table in it, and put some data in it and i've made some changes to that dataset (by code).

Is there a way to get the actual t-sql queries this dataset will perform on the sql server when I update the dataset to the database with code that looks something like this:

var dataAdapter = new SqlDataAdapter(cmdText, connection);
var affected = dataAdapter.Update(updatedDataSet);

I want to know what queries this dataset will fire to the database so I can log these changes to a logfile in my c# program.

© Stack Overflow or respective owner

Related posts about c#

Related posts about dataset