Yes, according to what Ian said, I donβt know only the common registrar with SQlCommand / SQLConnections, which you can connect, but if you generate your SQLCommands from a standard place, you can use
StatementCompletedEventHandler
And from there, transfer the text of the commands to some general log, for example, log4net / Console.Write / or something from MS Ent Lib
This is probably not the simple solution you were hoping for :-) Ideally, there would be some kind of logging class that you could register in the configuration file, but I don't know anything about it: - /
source share