How to capture the last executed sql statement on a classic asp website.
My classic asp website is on windows 2008 and sql 2008
i'm handling errors using server.transfer to an asp page 500.asp
i'm able to transfer the connection object from the page that caused the error
This is an old website. The connection is in an include file. So i added session to it.
I dont want to open all the asp files and store teh sql statement in a session variable to be available in the 500.asp page.
is there any other simpler way to find out last executed sql statement. I'm on a shared hosting. so cannot use fn_get_sql or sys.[dm_exec_connections]