Using a .NET DbCommand object (e.g. OracleCommand, SqlCommand, ODBCCommand, etc.) with parameters, how can I get the SQL that will actually be executed, i.e. with filled parameter values? I could, of course, write my own search / replace method, but this is incredibly close to simply rewriting the parameter logic. (In particular, I would have to consider the type of parameter, parameter names displayed in nonparametric locations, etc.). Anyway, I'm looking for a built-in way to do this, if any.
David
source share