Is there a way to access the CommandText just after it gets executed? I have the following code:
cmd = new OracleCommand(sql.ToString(), conn);
cmd.Parameters.Add(new OracleParameter("@parm", parmValue));
OracleDataAdapter da = new OracleDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
What I need to know is the sql command string executed in the database that already has parmValue's value contained in the sql. In other words, I must not be able to see the string "@parm" inside the query but the value of it instead.
I need this so that I could push this sql in a log database for future reference.
Thanks in advance.