Is there an easy way to get the actual SQL query that is sent from a parametrized CommandText?
If I have
mySQLCommand.CommandText = ("UPDATE dbo.Users SET LimitTime=@limitTime WHERE userID=@userID");
how can I save that to a string with the values of limitTime and userID? I need to be able to log the actual SQL sent.
I have tried to do a mySQLCommand.CommandText.toString() but that does not fill in the values.
EDIT: sorry, this is not mySQL, it is for SQL Server. mySQLCommand is just what I called the SqlCommand variable. Did not even think that is could be confusing.