阅读背景:

DbCommand&Parameters:获取实际执行的SQL(填入参数值)

来源:互联网 

Using a .NET DbCommand (eg OracleCommand, SqlCommand, ODBCCommand, etc) object with Parameters, how can I get the SQL that will actually be executed - ie with the parameter values filled in? I could certainly write my own search / replace method, but that is incredibly close to just re-writing the logic behind the parameters. (Specifically, I would have to consider the parameter type, parameter names showing up in non-parameter locations, etc). Anyway, I am looking for a built in way to do it if there is one.Using a .NET DbCommand (eg OracleCommand, SqlCo




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: